diff --git a/configure b/configure index 8f35310cd08..87cea3912d1 100755 --- a/configure +++ b/configure @@ -17118,41 +17118,6 @@ cat >>confdefs.h <<_ACEOF _ACEOF -# The cast to long int works around a bug in the HP C Compiler, -# see AC_CHECK_SIZEOF for more information. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5 -$as_echo_n "checking alignment of long... " >&6; } -if ${ac_cv_alignof_long+:} false; then : - $as_echo_n "(cached) " >&6 -else - if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default -#ifndef offsetof -# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0) -#endif -typedef struct { char x; long y; } ac__type_alignof_;"; then : - -else - if test "$ac_cv_type_long" = yes; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot compute alignment of long -See \`config.log' for more details" "$LINENO" 5; } - else - ac_cv_alignof_long=0 - fi -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5 -$as_echo "$ac_cv_alignof_long" >&6; } - - - -cat >>confdefs.h <<_ACEOF -#define ALIGNOF_LONG $ac_cv_alignof_long -_ACEOF - - # The cast to long int works around a bug in the HP C Compiler, # see AC_CHECK_SIZEOF for more information. { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int64_t" >&5 @@ -17226,27 +17191,18 @@ _ACEOF # Compute maximum alignment of any basic type. # -# We require 'double' to have the strictest alignment among the basic types, -# because otherwise the C ABI might impose 8-byte alignment on some of the -# other C types that correspond to TYPALIGN_DOUBLE SQL types. That could -# cause a mismatch between the tuple layout and the C struct layout of a -# catalog tuple. We used to carefully order catalog columns such that any -# fixed-width, attalign=4 columns were at offsets divisible by 8 regardless -# of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms -# where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF. -# -# We assume without checking that long's alignment is at least as strong as -# char, short, or int. Note that we intentionally do not consider any types -# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too -# much of a penalty for disk and memory space. - -MAX_ALIGNOF=$ac_cv_alignof_double - -if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then - as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5 -fi -if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then - as_fn_error $? "alignment of 'int64_t' is greater than the alignment of 'double'" "$LINENO" 5 +# We assume without checking that the maximum alignment requirement is that +# of int64_t and/or double. (On most platforms those are the same, but not +# everywhere.) For historical reasons, both int8 and float8 datatypes have +# typalign 'd', and therefore will be aligned per ALIGNOF_DOUBLE in database +# tuples even if ALIGNOF_INT64_T is more. Note that we intentionally do not +# consider any types wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed +# 8 would be too much of a penalty for disk and memory space. + +if test $ac_cv_alignof_int64_t -gt $ac_cv_alignof_double ; then + MAX_ALIGNOF=$ac_cv_alignof_int64_t +else + MAX_ALIGNOF=$ac_cv_alignof_double fi cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 0bad016f01c..c3097343a92 100644 --- a/configure.ac +++ b/configure.ac @@ -2043,33 +2043,23 @@ AC_CHECK_SIZEOF([intmax_t]) AC_CHECK_ALIGNOF(short) AC_CHECK_ALIGNOF(int) -AC_CHECK_ALIGNOF(long) AC_CHECK_ALIGNOF(int64_t) AC_CHECK_ALIGNOF(double) # Compute maximum alignment of any basic type. # -# We require 'double' to have the strictest alignment among the basic types, -# because otherwise the C ABI might impose 8-byte alignment on some of the -# other C types that correspond to TYPALIGN_DOUBLE SQL types. That could -# cause a mismatch between the tuple layout and the C struct layout of a -# catalog tuple. We used to carefully order catalog columns such that any -# fixed-width, attalign=4 columns were at offsets divisible by 8 regardless -# of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms -# where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF. -# -# We assume without checking that long's alignment is at least as strong as -# char, short, or int. Note that we intentionally do not consider any types -# wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too -# much of a penalty for disk and memory space. - -MAX_ALIGNOF=$ac_cv_alignof_double +# We assume without checking that the maximum alignment requirement is that +# of int64_t and/or double. (On most platforms those are the same, but not +# everywhere.) For historical reasons, both int8 and float8 datatypes have +# typalign 'd', and therefore will be aligned per ALIGNOF_DOUBLE in database +# tuples even if ALIGNOF_INT64_T is more. Note that we intentionally do not +# consider any types wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed +# 8 would be too much of a penalty for disk and memory space. -if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then - AC_MSG_ERROR([alignment of 'long' is greater than the alignment of 'double']) -fi -if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then - AC_MSG_ERROR([alignment of 'int64_t' is greater than the alignment of 'double']) +if test $ac_cv_alignof_int64_t -gt $ac_cv_alignof_double ; then + MAX_ALIGNOF=$ac_cv_alignof_int64_t +else + MAX_ALIGNOF=$ac_cv_alignof_double fi AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any C data type.]) diff --git a/meson.build b/meson.build index 47b7eb02275..a7207304fd1 100644 --- a/meson.build +++ b/meson.build @@ -1827,32 +1827,29 @@ endif # Determine memory alignment requirements for the basic C data types. -alignof_types = ['short', 'int', 'long', 'double'] +alignof_types = ['short', 'int', 'int64_t', 'double'] foreach t : alignof_types - align = cc.alignment(t, args: test_c_args) + align = cc.alignment(t, args: test_c_args, prefix: '#include ') cdata.set('ALIGNOF_@0@'.format(t.to_upper()), align) endforeach # Compute maximum alignment of any basic type. # -# We require 'double' to have the strictest alignment among the basic types, -# because otherwise the C ABI might impose 8-byte alignment on some of the -# other C types that correspond to TYPALIGN_DOUBLE SQL types. That could -# cause a mismatch between the tuple layout and the C struct layout of a -# catalog tuple. We used to carefully order catalog columns such that any -# fixed-width, attalign=4 columns were at offsets divisible by 8 regardless -# of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms -# where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF. -# -# We assume without checking that int64_t's alignment is at least as strong -# as long, char, short, or int. Note that we intentionally do not consider -# any types wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 -# would be too much of a penalty for disk and memory space. +# We assume without checking that the maximum alignment requirement is that +# of int64_t and/or double. (On most platforms those are the same, but not +# everywhere.) For historical reasons, both int8 and float8 datatypes have +# typalign 'd', and therefore will be aligned per ALIGNOF_DOUBLE in database +# tuples even if ALIGNOF_INT64_T is more. Note that we intentionally do not +# consider any types wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed +# 8 would be too much of a penalty for disk and memory space. + +alignof_int64_t = cdata.get('ALIGNOF_INT64_T') alignof_double = cdata.get('ALIGNOF_DOUBLE') -if cc.alignment('int64_t', args: test_c_args, prefix: '#include ') > alignof_double - error('alignment of int64_t is greater than the alignment of double') +if alignof_int64_t > alignof_double + cdata.set('MAXIMUM_ALIGNOF', alignof_int64_t) +else + cdata.set('MAXIMUM_ALIGNOF', alignof_double) endif -cdata.set('MAXIMUM_ALIGNOF', alignof_double) cdata.set('SIZEOF_LONG', cc.sizeof('long', args: test_c_args)) cdata.set('SIZEOF_LONG_LONG', cc.sizeof('long long', args: test_c_args)) diff --git a/src/include/c.h b/src/include/c.h index 7ee4751992f..fb0ea1bc680 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -833,7 +833,7 @@ typedef NameData *Name; #define SHORTALIGN(LEN) TYPEALIGN(ALIGNOF_SHORT, (LEN)) #define INTALIGN(LEN) TYPEALIGN(ALIGNOF_INT, (LEN)) -#define LONGALIGN(LEN) TYPEALIGN(ALIGNOF_LONG, (LEN)) +#define INT64ALIGN(LEN) TYPEALIGN(ALIGNOF_INT64_T, (LEN)) #define DOUBLEALIGN(LEN) TYPEALIGN(ALIGNOF_DOUBLE, (LEN)) #define MAXALIGN(LEN) TYPEALIGN(MAXIMUM_ALIGNOF, (LEN)) /* MAXALIGN covers only built-in types, not buffers */ @@ -845,7 +845,7 @@ typedef NameData *Name; #define SHORTALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_SHORT, (LEN)) #define INTALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_INT, (LEN)) -#define LONGALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_LONG, (LEN)) +#define INT64ALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_INT64_T, (LEN)) #define DOUBLEALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_DOUBLE, (LEN)) #define MAXALIGN_DOWN(LEN) TYPEALIGN_DOWN(MAXIMUM_ALIGNOF, (LEN)) #define BUFFERALIGN_DOWN(LEN) TYPEALIGN_DOWN(ALIGNOF_BUFFER, (LEN)) diff --git a/src/include/catalog/genbki.h b/src/include/catalog/genbki.h index 4606a29160e..12d2a3e295b 100644 --- a/src/include/catalog/genbki.h +++ b/src/include/catalog/genbki.h @@ -19,6 +19,25 @@ #ifndef GENBKI_H #define GENBKI_H +/* + * These macros should be written before and after each catalog structure + * definition. On most platforms they do nothing, but on some platforms + * we need special hacks to coax the compiler into laying out the catalog + * struct compatibly with our tuple forming/deforming rules. + * + * On AIX, where ALIGNOF_DOUBLE < ALIGNOF_INT64_T, we need to coerce int64 + * catalog fields to be aligned on just 4-byte boundaries. Ideally we'd + * write this like pack(push,ALIGNOF_DOUBLE), but gcc seems unwilling + * to take anything but a plain string literal as the argument of _Pragma. + */ +#if ALIGNOF_DOUBLE < ALIGNOF_INT64_T +#define BEGIN_CATALOG_STRUCT _Pragma("pack(push,4)") +#define END_CATALOG_STRUCT _Pragma("pack(pop)") +#else +#define BEGIN_CATALOG_STRUCT +#define END_CATALOG_STRUCT +#endif + /* Introduces a catalog's structure definition */ #define CATALOG(name,oid,oidmacro) typedef struct CppConcat(FormData_,name) diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h index 7ea0f64176c..2b4f5dae5f2 100644 --- a/src/include/catalog/pg_aggregate.h +++ b/src/include/catalog/pg_aggregate.h @@ -29,6 +29,8 @@ * cpp turns this into typedef struct FormData_pg_aggregate * ---------------------------------------------------------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_aggregate,2600,AggregateRelationId) { /* pg_proc OID of the aggregate itself */ @@ -101,6 +103,8 @@ CATALOG(pg_aggregate,2600,AggregateRelationId) #endif } FormData_pg_aggregate; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_aggregate corresponds to a pointer to a tuple with * the format of pg_aggregate relation. diff --git a/src/include/catalog/pg_am.h b/src/include/catalog/pg_am.h index e039315255c..62bc3fb8206 100644 --- a/src/include/catalog/pg_am.h +++ b/src/include/catalog/pg_am.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_am * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_am,2601,AccessMethodRelationId) { Oid oid; /* oid */ @@ -40,6 +42,8 @@ CATALOG(pg_am,2601,AccessMethodRelationId) char amtype; } FormData_pg_am; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_am corresponds to a pointer to a tuple with * the format of pg_am relation. diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h index b27abb3b457..ebc774d73fb 100644 --- a/src/include/catalog/pg_amop.h +++ b/src/include/catalog/pg_amop.h @@ -51,6 +51,8 @@ * typedef struct FormData_pg_amop * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_amop,2602,AccessMethodOperatorRelationId) { Oid oid; /* oid */ @@ -80,6 +82,8 @@ CATALOG(pg_amop,2602,AccessMethodOperatorRelationId) Oid amopsortfamily BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_opfamily); } FormData_pg_amop; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_amop corresponds to a pointer to a tuple with * the format of pg_amop relation. diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h index 15c1201ff65..3a3869e75a9 100644 --- a/src/include/catalog/pg_amproc.h +++ b/src/include/catalog/pg_amproc.h @@ -40,6 +40,8 @@ * typedef struct FormData_pg_amproc * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_amproc,2603,AccessMethodProcedureRelationId) { Oid oid; /* oid */ @@ -60,6 +62,8 @@ CATALOG(pg_amproc,2603,AccessMethodProcedureRelationId) regproc amproc BKI_LOOKUP(pg_proc); } FormData_pg_amproc; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_amproc corresponds to a pointer to a tuple with * the format of pg_amproc relation. diff --git a/src/include/catalog/pg_attrdef.h b/src/include/catalog/pg_attrdef.h index 89ea89a6daa..8bbc3b88827 100644 --- a/src/include/catalog/pg_attrdef.h +++ b/src/include/catalog/pg_attrdef.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_attrdef * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_attrdef,2604,AttrDefaultRelationId) { Oid oid; /* oid */ @@ -41,6 +43,8 @@ CATALOG(pg_attrdef,2604,AttrDefaultRelationId) #endif } FormData_pg_attrdef; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_attrdef corresponds to a pointer to a tuple with * the format of pg_attrdef relation. diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index 45844bb752c..f33a57573f2 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -34,6 +34,8 @@ * You may need to change catalog/genbki.pl as well. * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75,AttributeRelation_Rowtype_Id) BKI_SCHEMA_MACRO { Oid attrelid BKI_LOOKUP(pg_class); /* OID of relation containing @@ -185,6 +187,8 @@ CATALOG(pg_attribute,1249,AttributeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(75, #endif } FormData_pg_attribute; +END_CATALOG_STRUCT + /* * ATTRIBUTE_FIXED_PART_SIZE is the size of the fixed-layout, * guaranteed-not-null part of a pg_attribute row. This is in fact as much diff --git a/src/include/catalog/pg_auth_members.h b/src/include/catalog/pg_auth_members.h index 92cf5271496..b1902321a8f 100644 --- a/src/include/catalog/pg_auth_members.h +++ b/src/include/catalog/pg_auth_members.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_auth_members * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_auth_members,1261,AuthMemRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2843,AuthMemRelation_Rowtype_Id) BKI_SCHEMA_MACRO { Oid oid; /* oid */ @@ -38,6 +40,8 @@ CATALOG(pg_auth_members,1261,AuthMemRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_ bool set_option; /* use SET ROLE to the target role? */ } FormData_pg_auth_members; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_auth_members corresponds to a pointer to a tuple with * the format of pg_auth_members relation. diff --git a/src/include/catalog/pg_authid.h b/src/include/catalog/pg_authid.h index bddb154cd1b..baf5b099797 100644 --- a/src/include/catalog/pg_authid.h +++ b/src/include/catalog/pg_authid.h @@ -28,6 +28,8 @@ * typedef struct FormData_pg_authid * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842,AuthIdRelation_Rowtype_Id) BKI_SCHEMA_MACRO { Oid oid; /* oid */ @@ -48,6 +50,8 @@ CATALOG(pg_authid,1260,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(284 #endif } FormData_pg_authid; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_authid corresponds to a pointer to a tuple with * the format of pg_authid relation. diff --git a/src/include/catalog/pg_cast.h b/src/include/catalog/pg_cast.h index 2c9633a5ecb..d81314946ee 100644 --- a/src/include/catalog/pg_cast.h +++ b/src/include/catalog/pg_cast.h @@ -29,6 +29,8 @@ * typedef struct FormData_pg_cast * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_cast,2605,CastRelationId) { Oid oid; /* oid */ @@ -49,6 +51,8 @@ CATALOG(pg_cast,2605,CastRelationId) char castmethod; } FormData_pg_cast; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_cast corresponds to a pointer to a tuple with * the format of pg_cast relation. diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 89ab34c8349..ae6e36aeff6 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -29,6 +29,8 @@ * BKI_BOOTSTRAP catalogs, since only those rows appear in pg_class.dat. * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,RelationRelation_Rowtype_Id) BKI_SCHEMA_MACRO { /* oid */ @@ -144,6 +146,8 @@ CATALOG(pg_class,1259,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,Relat #endif } FormData_pg_class; +END_CATALOG_STRUCT + /* Size of fixed part of pg_class tuples, not counting var-length fields */ #define CLASS_TUPLE_SIZE \ (offsetof(FormData_pg_class,relminmxid) + sizeof(TransactionId)) diff --git a/src/include/catalog/pg_collation.h b/src/include/catalog/pg_collation.h index 11abde18be9..8b1917ee99f 100644 --- a/src/include/catalog/pg_collation.h +++ b/src/include/catalog/pg_collation.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_collation * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_collation,3456,CollationRelationId) { Oid oid; /* oid */ @@ -50,6 +52,8 @@ CATALOG(pg_collation,3456,CollationRelationId) #endif } FormData_pg_collation; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_collation corresponds to a pointer to a row with * the format of pg_collation relation. diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h index d5661b5bdff..1b7fedf1750 100644 --- a/src/include/catalog/pg_constraint.h +++ b/src/include/catalog/pg_constraint.h @@ -28,6 +28,8 @@ * typedef struct FormData_pg_constraint * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_constraint,2606,ConstraintRelationId) { Oid oid; /* oid */ @@ -167,6 +169,8 @@ CATALOG(pg_constraint,2606,ConstraintRelationId) #endif } FormData_pg_constraint; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_constraint corresponds to a pointer to a tuple with * the format of pg_constraint relation. diff --git a/src/include/catalog/pg_conversion.h b/src/include/catalog/pg_conversion.h index f6a3d14e6b3..71f5de90497 100644 --- a/src/include/catalog/pg_conversion.h +++ b/src/include/catalog/pg_conversion.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_conversion * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_conversion,2607,ConversionRelationId) { /* oid */ @@ -53,6 +55,8 @@ CATALOG(pg_conversion,2607,ConversionRelationId) bool condefault BKI_DEFAULT(t); } FormData_pg_conversion; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_conversion corresponds to a pointer to a tuple with * the format of pg_conversion relation. diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h index a380bdc5134..8a495e96eed 100644 --- a/src/include/catalog/pg_database.h +++ b/src/include/catalog/pg_database.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_database * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248,DatabaseRelation_Rowtype_Id) BKI_SCHEMA_MACRO { /* oid */ @@ -88,6 +90,8 @@ CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID #endif } FormData_pg_database; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_database corresponds to a pointer to a tuple with * the format of pg_database relation. diff --git a/src/include/catalog/pg_db_role_setting.h b/src/include/catalog/pg_db_role_setting.h index c2d728b03db..f1cbba020b2 100644 --- a/src/include/catalog/pg_db_role_setting.h +++ b/src/include/catalog/pg_db_role_setting.h @@ -31,6 +31,8 @@ * typedef struct FormData_pg_db_role_setting * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION { /* database, or 0 for a role-specific setting */ @@ -44,6 +46,8 @@ CATALOG(pg_db_role_setting,2964,DbRoleSettingRelationId) BKI_SHARED_RELATION #endif } FormData_pg_db_role_setting; +END_CATALOG_STRUCT + typedef FormData_pg_db_role_setting * Form_pg_db_role_setting; DECLARE_TOAST_WITH_MACRO(pg_db_role_setting, 2966, 2967, PgDbRoleSettingToastTable, PgDbRoleSettingToastIndex); diff --git a/src/include/catalog/pg_default_acl.h b/src/include/catalog/pg_default_acl.h index c9cb4580010..dc1722f7a68 100644 --- a/src/include/catalog/pg_default_acl.h +++ b/src/include/catalog/pg_default_acl.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_default_acl * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_default_acl,826,DefaultAclRelationId) { Oid oid; /* oid */ @@ -42,6 +44,8 @@ CATALOG(pg_default_acl,826,DefaultAclRelationId) #endif } FormData_pg_default_acl; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_default_acl corresponds to a pointer to a tuple with * the format of pg_default_acl relation. diff --git a/src/include/catalog/pg_depend.h b/src/include/catalog/pg_depend.h index 6b849bc6d4c..af1423ade44 100644 --- a/src/include/catalog/pg_depend.h +++ b/src/include/catalog/pg_depend.h @@ -39,6 +39,8 @@ * typedef struct FormData_pg_depend * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_depend,2608,DependRelationId) { /* @@ -64,6 +66,8 @@ CATALOG(pg_depend,2608,DependRelationId) char deptype; /* see codes in dependency.h */ } FormData_pg_depend; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_depend corresponds to a pointer to a row with * the format of pg_depend relation. diff --git a/src/include/catalog/pg_description.h b/src/include/catalog/pg_description.h index 03fb1555037..98971d8ca11 100644 --- a/src/include/catalog/pg_description.h +++ b/src/include/catalog/pg_description.h @@ -45,6 +45,8 @@ * typedef struct FormData_pg_description * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_description,2609,DescriptionRelationId) { Oid objoid; /* OID of object itself */ @@ -56,6 +58,8 @@ CATALOG(pg_description,2609,DescriptionRelationId) #endif } FormData_pg_description; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_description corresponds to a pointer to a tuple with * the format of pg_description relation. diff --git a/src/include/catalog/pg_enum.h b/src/include/catalog/pg_enum.h index cbcc8fa6280..a1c73817fff 100644 --- a/src/include/catalog/pg_enum.h +++ b/src/include/catalog/pg_enum.h @@ -28,6 +28,8 @@ * typedef struct FormData_pg_enum * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_enum,3501,EnumRelationId) { Oid oid; /* oid */ @@ -36,6 +38,8 @@ CATALOG(pg_enum,3501,EnumRelationId) NameData enumlabel; /* text representation of enum value */ } FormData_pg_enum; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_enum corresponds to a pointer to a tuple with * the format of pg_enum relation. diff --git a/src/include/catalog/pg_event_trigger.h b/src/include/catalog/pg_event_trigger.h index c24113c2973..eaacaaf2e2c 100644 --- a/src/include/catalog/pg_event_trigger.h +++ b/src/include/catalog/pg_event_trigger.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_event_trigger * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_event_trigger,3466,EventTriggerRelationId) { Oid oid; /* oid */ @@ -42,6 +44,8 @@ CATALOG(pg_event_trigger,3466,EventTriggerRelationId) #endif } FormData_pg_event_trigger; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_event_trigger corresponds to a pointer to a tuple with * the format of pg_event_trigger relation. diff --git a/src/include/catalog/pg_extension.h b/src/include/catalog/pg_extension.h index 8ab5e3141d0..19ec291ad7e 100644 --- a/src/include/catalog/pg_extension.h +++ b/src/include/catalog/pg_extension.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_extension * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_extension,3079,ExtensionRelationId) { Oid oid; /* oid */ @@ -44,6 +46,8 @@ CATALOG(pg_extension,3079,ExtensionRelationId) #endif } FormData_pg_extension; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_extension corresponds to a pointer to a tuple with * the format of pg_extension relation. diff --git a/src/include/catalog/pg_foreign_data_wrapper.h b/src/include/catalog/pg_foreign_data_wrapper.h index d47bf467810..e6009069e82 100644 --- a/src/include/catalog/pg_foreign_data_wrapper.h +++ b/src/include/catalog/pg_foreign_data_wrapper.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_foreign_data_wrapper * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapperRelationId) { Oid oid; /* oid */ @@ -43,6 +45,8 @@ CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapperRelationId) #endif } FormData_pg_foreign_data_wrapper; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_foreign_data_wrapper corresponds to a pointer to a tuple with * the format of pg_foreign_data_wrapper relation. diff --git a/src/include/catalog/pg_foreign_server.h b/src/include/catalog/pg_foreign_server.h index beee97a4ddb..cac0b9faafe 100644 --- a/src/include/catalog/pg_foreign_server.h +++ b/src/include/catalog/pg_foreign_server.h @@ -25,6 +25,8 @@ * typedef struct FormData_pg_foreign_server * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_foreign_server,1417,ForeignServerRelationId) { Oid oid; /* oid */ @@ -40,6 +42,8 @@ CATALOG(pg_foreign_server,1417,ForeignServerRelationId) #endif } FormData_pg_foreign_server; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_foreign_server corresponds to a pointer to a tuple with * the format of pg_foreign_server relation. diff --git a/src/include/catalog/pg_foreign_table.h b/src/include/catalog/pg_foreign_table.h index 35c858f9de3..601115c183d 100644 --- a/src/include/catalog/pg_foreign_table.h +++ b/src/include/catalog/pg_foreign_table.h @@ -25,6 +25,8 @@ * typedef struct FormData_pg_foreign_table * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_foreign_table,3118,ForeignTableRelationId) { Oid ftrelid BKI_LOOKUP(pg_class); /* OID of foreign table */ @@ -35,6 +37,8 @@ CATALOG(pg_foreign_table,3118,ForeignTableRelationId) #endif } FormData_pg_foreign_table; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_foreign_table corresponds to a pointer to a tuple with * the format of pg_foreign_table relation. diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h index 02c99d70faf..d722efe49b4 100644 --- a/src/include/catalog/pg_index.h +++ b/src/include/catalog/pg_index.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_index. * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_index,2610,IndexRelationId) BKI_SCHEMA_MACRO { Oid indexrelid BKI_LOOKUP(pg_class); /* OID of the index */ @@ -62,6 +64,8 @@ CATALOG(pg_index,2610,IndexRelationId) BKI_SCHEMA_MACRO #endif } FormData_pg_index; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_index corresponds to a pointer to a tuple with * the format of pg_index relation. diff --git a/src/include/catalog/pg_inherits.h b/src/include/catalog/pg_inherits.h index c14aee773c3..7a36241d7b3 100644 --- a/src/include/catalog/pg_inherits.h +++ b/src/include/catalog/pg_inherits.h @@ -29,6 +29,8 @@ * typedef struct FormData_pg_inherits * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_inherits,2611,InheritsRelationId) { Oid inhrelid BKI_LOOKUP(pg_class); @@ -37,6 +39,8 @@ CATALOG(pg_inherits,2611,InheritsRelationId) bool inhdetachpending; } FormData_pg_inherits; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_inherits corresponds to a pointer to a tuple with * the format of pg_inherits relation. diff --git a/src/include/catalog/pg_init_privs.h b/src/include/catalog/pg_init_privs.h index 71d6d1c90d0..44c7e50d470 100644 --- a/src/include/catalog/pg_init_privs.h +++ b/src/include/catalog/pg_init_privs.h @@ -43,6 +43,8 @@ * typedef struct FormData_pg_init_privs * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_init_privs,3394,InitPrivsRelationId) { Oid objoid; /* OID of object itself */ @@ -56,6 +58,8 @@ CATALOG(pg_init_privs,3394,InitPrivsRelationId) #endif } FormData_pg_init_privs; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_init_privs corresponds to a pointer to a tuple with * the format of pg_init_privs relation. diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h index b049f20515a..d64e4525547 100644 --- a/src/include/catalog/pg_language.h +++ b/src/include/catalog/pg_language.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_language * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_language,2612,LanguageRelationId) { Oid oid; /* oid */ @@ -57,6 +59,8 @@ CATALOG(pg_language,2612,LanguageRelationId) #endif } FormData_pg_language; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_language corresponds to a pointer to a tuple with * the format of pg_language relation. diff --git a/src/include/catalog/pg_largeobject.h b/src/include/catalog/pg_largeobject.h index 8f845267c73..4f3c14c7eda 100644 --- a/src/include/catalog/pg_largeobject.h +++ b/src/include/catalog/pg_largeobject.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_largeobject * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_largeobject,2613,LargeObjectRelationId) { Oid loid BKI_LOOKUP(pg_largeobject_metadata); /* Identifier of large @@ -38,6 +40,8 @@ CATALOG(pg_largeobject,2613,LargeObjectRelationId) * zero-length) */ } FormData_pg_largeobject; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_largeobject corresponds to a pointer to a tuple with * the format of pg_largeobject relation. diff --git a/src/include/catalog/pg_largeobject_metadata.h b/src/include/catalog/pg_largeobject_metadata.h index 2ace42e4096..86f369255d4 100644 --- a/src/include/catalog/pg_largeobject_metadata.h +++ b/src/include/catalog/pg_largeobject_metadata.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_largeobject_metadata * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadataRelationId) { Oid oid; /* oid */ @@ -39,6 +41,8 @@ CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadataRelationId) #endif } FormData_pg_largeobject_metadata; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_largeobject_metadata corresponds to a pointer to a tuple * with the format of pg_largeobject_metadata relation. diff --git a/src/include/catalog/pg_namespace.h b/src/include/catalog/pg_namespace.h index a84a8db194b..474f4c574e0 100644 --- a/src/include/catalog/pg_namespace.h +++ b/src/include/catalog/pg_namespace.h @@ -32,6 +32,8 @@ * nspacl access privilege list * ---------------------------------------------------------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_namespace,2615,NamespaceRelationId) { Oid oid; /* oid */ @@ -44,6 +46,8 @@ CATALOG(pg_namespace,2615,NamespaceRelationId) #endif } FormData_pg_namespace; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_namespace corresponds to a pointer to a tuple with * the format of pg_namespace relation. diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h index 4fed59acb0e..46170c6c3c3 100644 --- a/src/include/catalog/pg_opclass.h +++ b/src/include/catalog/pg_opclass.h @@ -46,6 +46,8 @@ * typedef struct FormData_pg_opclass * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_opclass,2616,OperatorClassRelationId) { Oid oid; /* oid */ @@ -75,6 +77,8 @@ CATALOG(pg_opclass,2616,OperatorClassRelationId) Oid opckeytype BKI_DEFAULT(0) BKI_LOOKUP_OPT(pg_type); } FormData_pg_opclass; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_opclass corresponds to a pointer to a tuple with * the format of pg_opclass relation. diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index 89bec146f5c..f5b4d04783a 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -28,6 +28,8 @@ * typedef struct FormData_pg_operator * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_operator,2617,OperatorRelationId) { Oid oid; /* oid */ @@ -75,6 +77,8 @@ CATALOG(pg_operator,2617,OperatorRelationId) regproc oprjoin BKI_DEFAULT(-) BKI_LOOKUP_OPT(pg_proc); } FormData_pg_operator; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_operator corresponds to a pointer to a tuple with * the format of pg_operator relation. diff --git a/src/include/catalog/pg_opfamily.h b/src/include/catalog/pg_opfamily.h index afebcc9ae5a..563703f0f22 100644 --- a/src/include/catalog/pg_opfamily.h +++ b/src/include/catalog/pg_opfamily.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_opfamily * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_opfamily,2753,OperatorFamilyRelationId) { Oid oid; /* oid */ @@ -43,6 +45,8 @@ CATALOG(pg_opfamily,2753,OperatorFamilyRelationId) Oid opfowner BKI_DEFAULT(POSTGRES) BKI_LOOKUP(pg_authid); } FormData_pg_opfamily; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_opfamily corresponds to a pointer to a tuple with * the format of pg_opfamily relation. diff --git a/src/include/catalog/pg_parameter_acl.h b/src/include/catalog/pg_parameter_acl.h index 13a85db92db..a26b05a9bf2 100644 --- a/src/include/catalog/pg_parameter_acl.h +++ b/src/include/catalog/pg_parameter_acl.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_parameter_acl * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_parameter_acl,6243,ParameterAclRelationId) BKI_SHARED_RELATION { Oid oid; /* oid */ @@ -40,6 +42,8 @@ CATALOG(pg_parameter_acl,6243,ParameterAclRelationId) BKI_SHARED_RELATION #endif } FormData_pg_parameter_acl; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_parameter_acl corresponds to a pointer to a tuple with diff --git a/src/include/catalog/pg_partitioned_table.h b/src/include/catalog/pg_partitioned_table.h index e9a67bf6d40..db477951018 100644 --- a/src/include/catalog/pg_partitioned_table.h +++ b/src/include/catalog/pg_partitioned_table.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_partitioned_table * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_partitioned_table,3350,PartitionedRelationId) { Oid partrelid BKI_LOOKUP(pg_class); /* partitioned table oid */ @@ -57,6 +59,8 @@ CATALOG(pg_partitioned_table,3350,PartitionedRelationId) #endif } FormData_pg_partitioned_table; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_partitioned_table corresponds to a pointer to a tuple with * the format of pg_partitioned_table relation. diff --git a/src/include/catalog/pg_policy.h b/src/include/catalog/pg_policy.h index f64af8e3279..5bcaf0cd896 100644 --- a/src/include/catalog/pg_policy.h +++ b/src/include/catalog/pg_policy.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_policy * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_policy,3256,PolicyRelationId) { Oid oid; /* oid */ @@ -43,6 +45,8 @@ CATALOG(pg_policy,3256,PolicyRelationId) #endif } FormData_pg_policy; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_policy corresponds to a pointer to a row with * the format of pg_policy relation. diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 6ada01d6e19..2f9e0b695e2 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_proc * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,ProcedureRelation_Rowtype_Id) BKI_SCHEMA_MACRO { Oid oid; /* oid */ @@ -128,6 +130,8 @@ CATALOG(pg_proc,1255,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,Proce #endif } FormData_pg_proc; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_proc corresponds to a pointer to a tuple with * the format of pg_proc relation. diff --git a/src/include/catalog/pg_publication.h b/src/include/catalog/pg_publication.h index 368becca899..6e5f73caa9e 100644 --- a/src/include/catalog/pg_publication.h +++ b/src/include/catalog/pg_publication.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_publication * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_publication,6104,PublicationRelationId) { Oid oid; /* oid */ @@ -68,6 +70,8 @@ CATALOG(pg_publication,6104,PublicationRelationId) char pubgencols; } FormData_pg_publication; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_publication corresponds to a pointer to a tuple with * the format of pg_publication relation. diff --git a/src/include/catalog/pg_publication_namespace.h b/src/include/catalog/pg_publication_namespace.h index 1ce84fb5da9..6c21b248db2 100644 --- a/src/include/catalog/pg_publication_namespace.h +++ b/src/include/catalog/pg_publication_namespace.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_publication_namespace * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_publication_namespace,6237,PublicationNamespaceRelationId) { Oid oid; /* oid */ @@ -34,6 +36,8 @@ CATALOG(pg_publication_namespace,6237,PublicationNamespaceRelationId) Oid pnnspid BKI_LOOKUP(pg_namespace); /* Oid of the schema */ } FormData_pg_publication_namespace; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_publication_namespace corresponds to a pointer to a tuple with * the format of pg_publication_namespace relation. diff --git a/src/include/catalog/pg_publication_rel.h b/src/include/catalog/pg_publication_rel.h index 3a8790e8482..63eb7c75f53 100644 --- a/src/include/catalog/pg_publication_rel.h +++ b/src/include/catalog/pg_publication_rel.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_publication_rel * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_publication_rel,6106,PublicationRelRelationId) { Oid oid; /* oid */ @@ -38,6 +40,8 @@ CATALOG(pg_publication_rel,6106,PublicationRelRelationId) #endif } FormData_pg_publication_rel; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_publication_rel corresponds to a pointer to a tuple with * the format of pg_publication_rel relation. diff --git a/src/include/catalog/pg_range.h b/src/include/catalog/pg_range.h index 32ee8cf43a0..ee87ed3bf42 100644 --- a/src/include/catalog/pg_range.h +++ b/src/include/catalog/pg_range.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_range * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_range,3541,RangeRelationId) { /* OID of owning range type */ @@ -59,6 +61,8 @@ CATALOG(pg_range,3541,RangeRelationId) regproc rngsubdiff BKI_LOOKUP_OPT(pg_proc); } FormData_pg_range; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_range corresponds to a pointer to a tuple with * the format of pg_range relation. diff --git a/src/include/catalog/pg_replication_origin.h b/src/include/catalog/pg_replication_origin.h index bf54442fd06..565d71ad0b3 100644 --- a/src/include/catalog/pg_replication_origin.h +++ b/src/include/catalog/pg_replication_origin.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_replication_origin * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) BKI_SHARED_RELATION { /* @@ -52,6 +54,8 @@ CATALOG(pg_replication_origin,6000,ReplicationOriginRelationId) BKI_SHARED_RELAT #endif } FormData_pg_replication_origin; +END_CATALOG_STRUCT + typedef FormData_pg_replication_origin *Form_pg_replication_origin; DECLARE_UNIQUE_INDEX_PKEY(pg_replication_origin_roiident_index, 6001, ReplicationOriginIdentIndex, pg_replication_origin, btree(roident oid_ops)); diff --git a/src/include/catalog/pg_rewrite.h b/src/include/catalog/pg_rewrite.h index c9ce420eb6f..fe82e84be4e 100644 --- a/src/include/catalog/pg_rewrite.h +++ b/src/include/catalog/pg_rewrite.h @@ -29,6 +29,8 @@ * typedef struct FormData_pg_rewrite * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_rewrite,2618,RewriteRelationId) { Oid oid; /* oid */ @@ -44,6 +46,8 @@ CATALOG(pg_rewrite,2618,RewriteRelationId) #endif } FormData_pg_rewrite; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_rewrite corresponds to a pointer to a tuple with * the format of pg_rewrite relation. diff --git a/src/include/catalog/pg_seclabel.h b/src/include/catalog/pg_seclabel.h index 0c9d094b81b..8f5788ca663 100644 --- a/src/include/catalog/pg_seclabel.h +++ b/src/include/catalog/pg_seclabel.h @@ -25,6 +25,8 @@ * typedef struct FormData_pg_seclabel * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_seclabel,3596,SecLabelRelationId) { Oid objoid; /* OID of the object itself */ @@ -38,6 +40,8 @@ CATALOG(pg_seclabel,3596,SecLabelRelationId) #endif } FormData_pg_seclabel; +END_CATALOG_STRUCT + DECLARE_TOAST(pg_seclabel, 3598, 3599); DECLARE_UNIQUE_INDEX_PKEY(pg_seclabel_object_index, 3597, SecLabelObjectIndexId, pg_seclabel, btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops, provider text_ops)); diff --git a/src/include/catalog/pg_sequence.h b/src/include/catalog/pg_sequence.h index f8b9eaa9270..59820a86b8b 100644 --- a/src/include/catalog/pg_sequence.h +++ b/src/include/catalog/pg_sequence.h @@ -20,6 +20,8 @@ #include "catalog/genbki.h" #include "catalog/pg_sequence_d.h" /* IWYU pragma: export */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_sequence,2224,SequenceRelationId) { Oid seqrelid BKI_LOOKUP(pg_class); @@ -32,6 +34,8 @@ CATALOG(pg_sequence,2224,SequenceRelationId) bool seqcycle; } FormData_pg_sequence; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_sequence corresponds to a pointer to a tuple with * the format of pg_sequence relation. diff --git a/src/include/catalog/pg_shdepend.h b/src/include/catalog/pg_shdepend.h index 5e0945c55f2..80d5eb0255e 100644 --- a/src/include/catalog/pg_shdepend.h +++ b/src/include/catalog/pg_shdepend.h @@ -35,6 +35,8 @@ * typedef struct FormData_pg_shdepend * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_shdepend,1214,SharedDependRelationId) BKI_SHARED_RELATION { /* @@ -65,6 +67,8 @@ CATALOG(pg_shdepend,1214,SharedDependRelationId) BKI_SHARED_RELATION char deptype; /* see codes in dependency.h */ } FormData_pg_shdepend; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_shdepend corresponds to a pointer to a row with * the format of pg_shdepend relation. diff --git a/src/include/catalog/pg_shdescription.h b/src/include/catalog/pg_shdescription.h index 8fad7972d4c..f53d9f5dcd6 100644 --- a/src/include/catalog/pg_shdescription.h +++ b/src/include/catalog/pg_shdescription.h @@ -38,6 +38,8 @@ * typedef struct FormData_pg_shdescription * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_shdescription,2396,SharedDescriptionRelationId) BKI_SHARED_RELATION { Oid objoid; /* OID of object itself */ @@ -48,6 +50,8 @@ CATALOG(pg_shdescription,2396,SharedDescriptionRelationId) BKI_SHARED_RELATION #endif } FormData_pg_shdescription; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_shdescription corresponds to a pointer to a tuple with * the format of pg_shdescription relation. diff --git a/src/include/catalog/pg_shseclabel.h b/src/include/catalog/pg_shseclabel.h index c13ced36850..273c7790194 100644 --- a/src/include/catalog/pg_shseclabel.h +++ b/src/include/catalog/pg_shseclabel.h @@ -25,6 +25,8 @@ * typedef struct FormData_pg_shseclabel * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_shseclabel,3592,SharedSecLabelRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066,SharedSecLabelRelation_Rowtype_Id) BKI_SCHEMA_MACRO { Oid objoid; /* OID of the shared object itself */ @@ -37,6 +39,8 @@ CATALOG(pg_shseclabel,3592,SharedSecLabelRelationId) BKI_SHARED_RELATION BKI_ROW #endif } FormData_pg_shseclabel; +END_CATALOG_STRUCT + typedef FormData_pg_shseclabel * Form_pg_shseclabel; DECLARE_TOAST_WITH_MACRO(pg_shseclabel, 4060, 4061, PgShseclabelToastTable, PgShseclabelToastIndex); diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h index c31c163d0cc..032bf177b95 100644 --- a/src/include/catalog/pg_statistic.h +++ b/src/include/catalog/pg_statistic.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_statistic * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_statistic,2619,StatisticRelationId) { /* These fields form the unique key for the entry: */ @@ -124,6 +126,8 @@ CATALOG(pg_statistic,2619,StatisticRelationId) #endif } FormData_pg_statistic; +END_CATALOG_STRUCT + #define STATISTIC_NUM_SLOTS 5 diff --git a/src/include/catalog/pg_statistic_ext.h b/src/include/catalog/pg_statistic_ext.h index 6842954d4cb..e4a0cb4d41c 100644 --- a/src/include/catalog/pg_statistic_ext.h +++ b/src/include/catalog/pg_statistic_ext.h @@ -30,6 +30,8 @@ * typedef struct FormData_pg_statistic_ext * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_statistic_ext,3381,StatisticExtRelationId) { Oid oid; /* oid */ @@ -61,6 +63,8 @@ CATALOG(pg_statistic_ext,3381,StatisticExtRelationId) } FormData_pg_statistic_ext; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_statistic_ext corresponds to a pointer to a tuple with * the format of pg_statistic_ext relation. diff --git a/src/include/catalog/pg_statistic_ext_data.h b/src/include/catalog/pg_statistic_ext_data.h index 7b7f2593491..dbc4acc7d1a 100644 --- a/src/include/catalog/pg_statistic_ext_data.h +++ b/src/include/catalog/pg_statistic_ext_data.h @@ -28,6 +28,8 @@ * typedef struct FormData_pg_statistic_ext_data * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId) { Oid stxoid BKI_LOOKUP(pg_statistic_ext); /* statistics object @@ -45,6 +47,8 @@ CATALOG(pg_statistic_ext_data,3429,StatisticExtDataRelationId) } FormData_pg_statistic_ext_data; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_statistic_ext_data corresponds to a pointer to a tuple with * the format of pg_statistic_ext_data relation. diff --git a/src/include/catalog/pg_subscription.h b/src/include/catalog/pg_subscription.h index 805493d85c5..c369b5abfb3 100644 --- a/src/include/catalog/pg_subscription.h +++ b/src/include/catalog/pg_subscription.h @@ -40,6 +40,8 @@ * here, be sure to update that (or, if the new column is not to be publicly * readable, update associated comments and catalogs.sgml instead). */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_subscription,6100,SubscriptionRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101,SubscriptionRelation_Rowtype_Id) BKI_SCHEMA_MACRO { Oid oid; /* oid */ @@ -111,6 +113,8 @@ CATALOG(pg_subscription,6100,SubscriptionRelationId) BKI_SHARED_RELATION BKI_ROW #endif } FormData_pg_subscription; +END_CATALOG_STRUCT + typedef FormData_pg_subscription *Form_pg_subscription; DECLARE_TOAST_WITH_MACRO(pg_subscription, 4183, 4184, PgSubscriptionToastTable, PgSubscriptionToastIndex); diff --git a/src/include/catalog/pg_subscription_rel.h b/src/include/catalog/pg_subscription_rel.h index f810b34c78d..502640d3018 100644 --- a/src/include/catalog/pg_subscription_rel.h +++ b/src/include/catalog/pg_subscription_rel.h @@ -28,6 +28,8 @@ * typedef struct FormData_pg_subscription_rel * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_subscription_rel,6102,SubscriptionRelRelationId) { Oid srsubid BKI_LOOKUP(pg_subscription); /* Oid of subscription */ @@ -47,6 +49,8 @@ CATALOG(pg_subscription_rel,6102,SubscriptionRelRelationId) #endif } FormData_pg_subscription_rel; +END_CATALOG_STRUCT + typedef FormData_pg_subscription_rel *Form_pg_subscription_rel; DECLARE_UNIQUE_INDEX_PKEY(pg_subscription_rel_srrelid_srsubid_index, 6117, SubscriptionRelSrrelidSrsubidIndexId, pg_subscription_rel, btree(srrelid oid_ops, srsubid oid_ops)); diff --git a/src/include/catalog/pg_tablespace.h b/src/include/catalog/pg_tablespace.h index fe7a5ab538f..3bd4a74f003 100644 --- a/src/include/catalog/pg_tablespace.h +++ b/src/include/catalog/pg_tablespace.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_tablespace * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_tablespace,1213,TableSpaceRelationId) BKI_SHARED_RELATION { Oid oid; /* oid */ @@ -40,6 +42,8 @@ CATALOG(pg_tablespace,1213,TableSpaceRelationId) BKI_SHARED_RELATION #endif } FormData_pg_tablespace; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_tablespace corresponds to a pointer to a tuple with * the format of pg_tablespace relation. diff --git a/src/include/catalog/pg_transform.h b/src/include/catalog/pg_transform.h index f8bdad17897..115608de43c 100644 --- a/src/include/catalog/pg_transform.h +++ b/src/include/catalog/pg_transform.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_transform * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_transform,3576,TransformRelationId) { Oid oid; /* oid */ @@ -35,6 +37,8 @@ CATALOG(pg_transform,3576,TransformRelationId) regproc trftosql BKI_LOOKUP_OPT(pg_proc); } FormData_pg_transform; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_transform corresponds to a pointer to a tuple with * the format of pg_transform relation. diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h index 563aa1ad638..2377e2f3167 100644 --- a/src/include/catalog/pg_trigger.h +++ b/src/include/catalog/pg_trigger.h @@ -31,6 +31,8 @@ * to be associated with a deferrable constraint. * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_trigger,2620,TriggerRelationId) { Oid oid; /* oid */ @@ -72,6 +74,8 @@ CATALOG(pg_trigger,2620,TriggerRelationId) #endif } FormData_pg_trigger; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_trigger corresponds to a pointer to a tuple with * the format of pg_trigger relation. diff --git a/src/include/catalog/pg_ts_config.h b/src/include/catalog/pg_ts_config.h index 3e249e5d85c..0bbcb3249dc 100644 --- a/src/include/catalog/pg_ts_config.h +++ b/src/include/catalog/pg_ts_config.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_ts_config * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_ts_config,3602,TSConfigRelationId) { /* oid */ @@ -45,6 +47,8 @@ CATALOG(pg_ts_config,3602,TSConfigRelationId) Oid cfgparser BKI_LOOKUP(pg_ts_parser); } FormData_pg_ts_config; +END_CATALOG_STRUCT + typedef FormData_pg_ts_config *Form_pg_ts_config; DECLARE_UNIQUE_INDEX(pg_ts_config_cfgname_index, 3608, TSConfigNameNspIndexId, pg_ts_config, btree(cfgname name_ops, cfgnamespace oid_ops)); diff --git a/src/include/catalog/pg_ts_config_map.h b/src/include/catalog/pg_ts_config_map.h index 46ac7290c3b..51feb1b9e8f 100644 --- a/src/include/catalog/pg_ts_config_map.h +++ b/src/include/catalog/pg_ts_config_map.h @@ -27,6 +27,8 @@ * typedef struct FormData_pg_ts_config_map * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_ts_config_map,3603,TSConfigMapRelationId) { /* OID of configuration owning this entry */ @@ -42,6 +44,8 @@ CATALOG(pg_ts_config_map,3603,TSConfigMapRelationId) Oid mapdict BKI_LOOKUP(pg_ts_dict); } FormData_pg_ts_config_map; +END_CATALOG_STRUCT + typedef FormData_pg_ts_config_map *Form_pg_ts_config_map; DECLARE_UNIQUE_INDEX_PKEY(pg_ts_config_map_index, 3609, TSConfigMapIndexId, pg_ts_config_map, btree(mapcfg oid_ops, maptokentype int4_ops, mapseqno int4_ops)); diff --git a/src/include/catalog/pg_ts_dict.h b/src/include/catalog/pg_ts_dict.h index 826e79325f0..d47b05ae5cc 100644 --- a/src/include/catalog/pg_ts_dict.h +++ b/src/include/catalog/pg_ts_dict.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_ts_dict * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_ts_dict,3600,TSDictionaryRelationId) { /* oid */ @@ -49,6 +51,8 @@ CATALOG(pg_ts_dict,3600,TSDictionaryRelationId) #endif } FormData_pg_ts_dict; +END_CATALOG_STRUCT + typedef FormData_pg_ts_dict *Form_pg_ts_dict; DECLARE_TOAST(pg_ts_dict, 4169, 4170); diff --git a/src/include/catalog/pg_ts_parser.h b/src/include/catalog/pg_ts_parser.h index 30eabc91c91..181e869ac75 100644 --- a/src/include/catalog/pg_ts_parser.h +++ b/src/include/catalog/pg_ts_parser.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_ts_parser * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_ts_parser,3601,TSParserRelationId) { Oid oid; /* oid */ @@ -52,6 +54,8 @@ CATALOG(pg_ts_parser,3601,TSParserRelationId) regproc prslextype BKI_LOOKUP(pg_proc); } FormData_pg_ts_parser; +END_CATALOG_STRUCT + typedef FormData_pg_ts_parser *Form_pg_ts_parser; DECLARE_UNIQUE_INDEX(pg_ts_parser_prsname_index, 3606, TSParserNameNspIndexId, pg_ts_parser, btree(prsname name_ops, prsnamespace oid_ops)); diff --git a/src/include/catalog/pg_ts_template.h b/src/include/catalog/pg_ts_template.h index 990f209fec2..5c28991e27b 100644 --- a/src/include/catalog/pg_ts_template.h +++ b/src/include/catalog/pg_ts_template.h @@ -26,6 +26,8 @@ * typedef struct FormData_pg_ts_template * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_ts_template,3764,TSTemplateRelationId) { Oid oid; /* oid */ @@ -43,6 +45,8 @@ CATALOG(pg_ts_template,3764,TSTemplateRelationId) regproc tmpllexize BKI_LOOKUP(pg_proc); } FormData_pg_ts_template; +END_CATALOG_STRUCT + typedef FormData_pg_ts_template *Form_pg_ts_template; DECLARE_UNIQUE_INDEX(pg_ts_template_tmplname_index, 3766, TSTemplateNameNspIndexId, pg_ts_template, btree(tmplname name_ops, tmplnamespace oid_ops)); diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index 70d4a20c02b..74183ec5a2e 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -33,6 +33,8 @@ * See struct FormData_pg_attribute for details. * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelation_Rowtype_Id) BKI_SCHEMA_MACRO { Oid oid; /* oid */ @@ -253,6 +255,8 @@ CATALOG(pg_type,1247,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelati #endif } FormData_pg_type; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_type corresponds to a pointer to a row with * the format of pg_type relation. diff --git a/src/include/catalog/pg_user_mapping.h b/src/include/catalog/pg_user_mapping.h index 42fb41a6341..921a9ec009d 100644 --- a/src/include/catalog/pg_user_mapping.h +++ b/src/include/catalog/pg_user_mapping.h @@ -25,6 +25,8 @@ * typedef struct FormData_pg_user_mapping * ---------------- */ +BEGIN_CATALOG_STRUCT + CATALOG(pg_user_mapping,1418,UserMappingRelationId) { Oid oid; /* oid */ @@ -40,6 +42,8 @@ CATALOG(pg_user_mapping,1418,UserMappingRelationId) #endif } FormData_pg_user_mapping; +END_CATALOG_STRUCT + /* ---------------- * Form_pg_user_mapping corresponds to a pointer to a tuple with * the format of pg_user_mapping relation. diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index af08c5a7eb8..a0bd84376e7 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -12,9 +12,6 @@ /* The normal alignment of `int64_t', in bytes. */ #undef ALIGNOF_INT64_T -/* The normal alignment of `long', in bytes. */ -#undef ALIGNOF_LONG - /* The normal alignment of `PG_INT128_TYPE', in bytes. */ #undef ALIGNOF_PG_INT128_TYPE