Add missing TYPEALIGN macros
authorJohn Naylor <[email protected]>
Wed, 16 Feb 2022 12:33:28 +0000 (19:33 +0700)
committerJohn Naylor <[email protected]>
Wed, 16 Feb 2022 12:33:28 +0000 (19:33 +0700)
A couple call sites still had hard-coded characters.

Amul Sul

Discussion: https://www.postgresql.org/message-id/CAAJ_b94Y35MWB3PJoCbc_O-_Q4%2B-9DHKhWtAwboEyx8wm4mqcA%40mail.gmail.com

src/backend/commands/typecmds.c

index 053d15475320caa00ea446bf237c6f82c950717c..9b92b0424206c9b143e9be2fe49b0ec00a896077 100644 (file)
@@ -1895,10 +1895,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(&paramModes, 1, CHAROID,
-                                    1, true, 'c');
+                                    1, true, TYPALIGN_CHAR);
    myself = ProcedureCreate(name,  /* name: same as multirange type */
                             namespace,
                             false, /* replace */