minor code correction in typecmds.c
Started by Amul Sulalmost 4 years ago2 messages
Hi,
The attached patch replaces the hard-coded type alignment value with
the defined macro for the same.
--
Regards,
Amul Sul
EDB: http://www.enterprisedb.com
Attachments:
use_TYPALIGN_macro.patchapplication/x-patch; name=use_TYPALIGN_macro.patchDownload
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index ce8c1badb39..ef6f14785a0 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -1910,10 +1910,10 @@ makeMultirangeConstructors(const char *name, Oid namespace,
allParamTypes = ObjectIdGetDatum(rangeArrayOid);
allParameterTypes = construct_array(&allParamTypes,
1, OIDOID,
- sizeof(Oid), true, 'i');
+ sizeof(Oid), true, TYPALIGN_INT);
paramModes = CharGetDatum(FUNC_PARAM_VARIADIC);
parameterModes = construct_array(¶mModes, 1, CHAROID,
- 1, true, 'c');
+ 1, true, TYPALIGN_CHAR);
myself = ProcedureCreate(name, /* name: same as multirange type */
namespace,
false, /* replace */
Re: minor code correction in typecmds.c
On Wed, Feb 16, 2022 at 7:17 PM Amul Sul <sulamul@gmail.com> wrote:
Hi,
The attached patch replaces the hard-coded type alignment value with
the defined macro for the same.
Pushed, thanks!
--
John Naylor
EDB: http://www.enterprisedb.com