]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Cope with AIX's alignment woes by using _Pragma("pack").
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 23 Feb 2026 17:34:51 +0000 (12:34 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 23 Feb 2026 17:34:54 +0000 (12:34 -0500)
Because we assume that int64 and double have the same alignment
requirement, AIX's default behavior that alignof(double) = 4 while
alignof(int64) = 8 is a headache.  There are two issues:

1. We align both int8 and float8 tuple columns per ALIGNOF_DOUBLE,
which is an ancient choice that can't be undone without breaking
pg_upgrade and creating some subtle SQL-level compatibility issues
too.  However, the cost of that is just some marginal inefficiency
in fetching int8 values, which can't be too awful if the platform
architects were willing to pay the same costs for fetching float8s.
So our decision is to leave that alone.  This patch makes our
alignment choices the same as they were pre-v17, namely that
ALIGNOF_DOUBLE and ALIGNOF_INT64_T are whatever the compiler prefers
and then MAXIMUM_ALIGNOF is the larger of the two.  (On all supported
platforms other than AIX, all three values will be the same.)

2.  We need to overlay C structs onto catalog tuples, and int8 fields
in those struct declarations may not be aligned to match this rule.

In the old branches we had some annoying rules about ordering catalog
columns to avoid alignment problems, but nobody wants to resurrect
those.  However, there's a better answer: make the compiler construe
those struct declarations the way we need it to by using the pack(N)
pragma.  This requires no manual effort to maintain going forward;
we only have to insert the pragma into all the catalog *.h files.
(As the catalogs stand at this writing, nothing actually changes
because we've not moved any affected columns since v16; hence no
catversion bump is required.  The point of this is to not have
to worry about the issue going forward.)

We did not have this option when the AIX port was first made.  This
patch depends on the C99 feature _Pragma(), as well as the pack(N)
pragma which dates to somewhere around gcc 4.0, and probably doesn't
exist in xlc at all.  But now that we've agreed to toss xlc support
out the window, there doesn't seem to be a reason not to go this way.

In passing, I got rid of LONGALIGN[_DOWN] along with the configure
probes for ALIGNOF_LONG.  We were not using those anywhere and it
seems highly unlikely that we'd do so in future.  Instead supply
INT64ALIGN[_DOWN], which isn't used either but at least could
have a good reason to be used.

Discussion: https://postgr.es/m/1127261.1769649624@sss.pgh.pa.us

70 files changed:
configure
configure.ac
meson.build
src/include/c.h
src/include/catalog/genbki.h
src/include/catalog/pg_aggregate.h
src/include/catalog/pg_am.h
src/include/catalog/pg_amop.h
src/include/catalog/pg_amproc.h
src/include/catalog/pg_attrdef.h
src/include/catalog/pg_attribute.h
src/include/catalog/pg_auth_members.h
src/include/catalog/pg_authid.h
src/include/catalog/pg_cast.h
src/include/catalog/pg_class.h
src/include/catalog/pg_collation.h
src/include/catalog/pg_constraint.h
src/include/catalog/pg_conversion.h
src/include/catalog/pg_database.h
src/include/catalog/pg_db_role_setting.h
src/include/catalog/pg_default_acl.h
src/include/catalog/pg_depend.h
src/include/catalog/pg_description.h
src/include/catalog/pg_enum.h
src/include/catalog/pg_event_trigger.h
src/include/catalog/pg_extension.h
src/include/catalog/pg_foreign_data_wrapper.h
src/include/catalog/pg_foreign_server.h
src/include/catalog/pg_foreign_table.h
src/include/catalog/pg_index.h
src/include/catalog/pg_inherits.h
src/include/catalog/pg_init_privs.h
src/include/catalog/pg_language.h
src/include/catalog/pg_largeobject.h
src/include/catalog/pg_largeobject_metadata.h
src/include/catalog/pg_namespace.h
src/include/catalog/pg_opclass.h
src/include/catalog/pg_operator.h
src/include/catalog/pg_opfamily.h
src/include/catalog/pg_parameter_acl.h
src/include/catalog/pg_partitioned_table.h
src/include/catalog/pg_policy.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_publication.h
src/include/catalog/pg_publication_namespace.h
src/include/catalog/pg_publication_rel.h
src/include/catalog/pg_range.h
src/include/catalog/pg_replication_origin.h
src/include/catalog/pg_rewrite.h
src/include/catalog/pg_seclabel.h
src/include/catalog/pg_sequence.h
src/include/catalog/pg_shdepend.h
src/include/catalog/pg_shdescription.h
src/include/catalog/pg_shseclabel.h
src/include/catalog/pg_statistic.h
src/include/catalog/pg_statistic_ext.h
src/include/catalog/pg_statistic_ext_data.h
src/include/catalog/pg_subscription.h
src/include/catalog/pg_subscription_rel.h
src/include/catalog/pg_tablespace.h
src/include/catalog/pg_transform.h
src/include/catalog/pg_trigger.h
src/include/catalog/pg_ts_config.h
src/include/catalog/pg_ts_config_map.h
src/include/catalog/pg_ts_dict.h
src/include/catalog/pg_ts_parser.h
src/include/catalog/pg_ts_template.h
src/include/catalog/pg_type.h
src/include/catalog/pg_user_mapping.h
src/include/pg_config.h.in

index 8f35310cd08755f20494f8a8a100e0855a5c49ed..87cea3912d13899537a27eacaaba7c4a52f22536 100755 (executable)
--- 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
index 0bad016f01c8a0f7350bc9d0975f43b60c139972..c3097343a92637a28210b7ebca2278a853da2c19 100644 (file)
@@ -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.])
 
index 47b7eb02275e086eda874391592b22eddac661e7..a7207304fd15e3612878aaa5882d2459f852c923 100644 (file)
@@ -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 <stdint.h>')
   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 <stdint.h>') > 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))
index 7ee4751992f7dbe18af97b9cb216acff15bc8a53..fb0ea1bc680b68ff032f3e186f38e0ea7ea4bb09 100644 (file)
@@ -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))
index 4606a29160eea2b47fb202b0d4b5b0ca9c2477dd..12d2a3e295bee35c224a362617f95002fbd64ab8 100644 (file)
 #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)
 
index 7ea0f64176cc11d522092025edc00d1fe0986bca..2b4f5dae5f2910b841526e7e62d5302806a4d39d 100644 (file)
@@ -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.
index e039315255c8068a4e24c81e1d5d2debfdea4ee2..62bc3fb820664259a5c88273471209af7affd349 100644 (file)
@@ -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.
index b27abb3b457b8036e46ed04bc2f78b361d35edda..ebc774d73fb37ad4b4758574b71d3550a4521f9d 100644 (file)
@@ -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.
index 15c1201ff655768fc0f88f2753f021495af37df2..3a3869e75a970f1bc7e33d7ae11b61e4645ad9a6 100644 (file)
@@ -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.
index 89ea89a6daac4d88844338506da844f8de67cdbd..8bbc3b888276922f4fe3267f872267cbee49408d 100644 (file)
@@ -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.
index 45844bb752c107694bde682e37b1ea1f7baa4bb8..f33a57573f26dae0689f3622401d120cb22607ca 100644 (file)
@@ -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
index 92cf5271496f61e44c4e557a7cf62caa5fc15f1a..b1902321a8fbfcd654e99e0746c700bc1e618d9a 100644 (file)
@@ -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.
index bddb154cd1bc4d819c68ec5cfd93ce01600c9413..baf5b09979790e4b768bf921c2e7765d0fcdad34 100644 (file)
@@ -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.
index 2c9633a5ecb2849fc90aede8e6501a49cf91eeb3..d81314946eeb6456ad50a9932e0551b8eff0960a 100644 (file)
@@ -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.
index 89ab34c8349fa86a18218bb283d0967e9f6a03ec..ae6e36aeff63d08fe47ffe49034828d8adf16199 100644 (file)
@@ -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))
index 11abde18be9a998d180d125ab82845c1c60ecb41..8b1917ee99fe9c04e8080072e2c5b62ca9191b35 100644 (file)
@@ -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.
index d5661b5bdffd805611740bfb30ebc5a3eab2f3e1..1b7fedf1750e5111bc03921282ccc55dc847a003 100644 (file)
@@ -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.
index f6a3d14e6b3a11af53811661745707fe3a21a3b9..71f5de904973dbf768fb3d96c2cb4d0b01cc6733 100644 (file)
@@ -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.
index a380bdc5134ab530bd85a1d9522df0aaa1d0a475..8a495e96eed359677a578cdecc461e463d3e2082 100644 (file)
@@ -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.
index c2d728b03db0f269ffe3f2993371f1082b782886..f1cbba020b2291cdd213ad45f43d40b0c977ed34 100644 (file)
@@ -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);
index c9cb458001088c82fe01d99f881250c404ee6c68..dc1722f7a68fb322d22a04a59cbe5994be141267 100644 (file)
@@ -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.
index 6b849bc6d4cffb3e8eb1cfc9e4103cd65f498b83..af1423ade4489ff091e398280c14031644d0e258 100644 (file)
@@ -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.
index 03fb1555037f4cb74d197b3559f93949960fe7a8..98971d8ca11717b9337f0e8f07c5c99e26671c5f 100644 (file)
@@ -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.
index cbcc8fa62808b2f7cbdd7dbcbfafc1f7d50d0bcf..a1c73817fffb209a7dd454843e12c3a22f292814 100644 (file)
@@ -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.
index c24113c2973cd6921b63ad19a1b693c38eab09f0..eaacaaf2e2cfc915bba8fbc9795eade6777840e2 100644 (file)
@@ -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.
index 8ab5e3141d0c94f3fe6961b412e601c4df41c89a..19ec291ad7ea8783c765412c82df6f29ab62d10b 100644 (file)
@@ -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.
index d47bf467810c15f5d14d3a88ba9724d224cab577..e6009069e82b7c3fa38541d6f73e2b2c8997f725 100644 (file)
@@ -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.
index beee97a4ddbd5e6580f491d6e6ba7868a058e9bc..cac0b9faafed52727b6871093974624862b15822 100644 (file)
@@ -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.
index 35c858f9de384eac67d9ee0fe95bbc572447e94b..601115c183d7425b4726d3b572999eb8616fea68 100644 (file)
@@ -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.
index 02c99d70faf950b5f5dd547d95ef72f4bc5b4824..d722efe49b4c0946793cba3331be6e445b20bf8e 100644 (file)
@@ -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.
index c14aee773c3ea69083e22b086c13966bc061c999..7a36241d7b3596bd8ded7df8b292292c99ac6dfb 100644 (file)
@@ -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.
index 71d6d1c90d046a2cef4a9c56fb0b75288804527a..44c7e50d470e4f369412de7e9d173fe60f762144 100644 (file)
@@ -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.
index b049f20515a1d7a213b11219269975bbd4ca1b05..d64e4525547fcaf4f05d30825f55b45b6cf7af61 100644 (file)
@@ -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.
index 8f845267c73026e486305dd4709b71f86d445790..4f3c14c7edab82706715f7590ac35b74b1c34396 100644 (file)
@@ -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.
index 2ace42e40961bfafe3e58d384f4c488ffe7ac33e..86f369255d41787a93cfe0af54a2038e431e137c 100644 (file)
@@ -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.
index a84a8db194be2ace037bc8668bd92a54fb849119..474f4c574e07a4c44deca681d7e47bc39ef21afc 100644 (file)
@@ -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.
index 4fed59acb0efc9c400e01fcbdbe393c25692d739..46170c6c3c3bb632207c17450302201c684a2063 100644 (file)
@@ -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.
index 89bec146f5c7d340ee4d9f1a68d4ad8eaa9886dd..f5b4d04783a794a315fd947fdd1611ce678324e5 100644 (file)
@@ -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.
index afebcc9ae5a99e1c24f66433e6b5c81682f6e773..563703f0f22bbb29f99c711c77ed103a0a18487f 100644 (file)
@@ -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.
index 13a85db92db921dd06d4f8f9aeaa5c721ed42969..a26b05a9bf2e4e11252805ccde49b8d781a0727d 100644 (file)
@@ -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
index e9a67bf6d404848dc2bd0c139558e2ade0f0d106..db477951018057590b80793174c867a35801b63e 100644 (file)
@@ -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.
index f64af8e32790dbe85f79f5a7f6d928a5824ae5ed..5bcaf0cd8961dd677f38e57d065cdadd063b233f 100644 (file)
@@ -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.
index 6ada01d6e19675c5da5e223f366bd2847891e002..2f9e0b695e26b8df56f101ce0e2d6e3c2e30b5ed 100644 (file)
@@ -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.
index 368becca89950c43ba03269c764511c686284552..6e5f73caa9e3ef81c8563b093539c55d1e62f7bc 100644 (file)
@@ -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.
index 1ce84fb5da9e49fca904ee2a235bc8e2650cb672..6c21b248db2b2fa23707701d02b7d0a42f2443c3 100644 (file)
@@ -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.
index 3a8790e8482711ee2c5de950300f520fd3de7a49..63eb7c75f53d3f6fe15cdc423a17c5d03646269f 100644 (file)
@@ -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.
index 32ee8cf43a03a0d5e6b1a82e0294040419c2e4ab..ee87ed3bf42193848f17d79c464cb1062d7dd3e3 100644 (file)
@@ -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.
index bf54442fd068fb4e66163bed5cb5f374fc070d49..565d71ad0b3763af29edc9bb77c8d154e1ea8577 100644 (file)
@@ -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));
index c9ce420eb6fa2a8bb26a8842a14cfd6e7647c9ea..fe82e84be4e2195d1e19dccfae3ccf38497de3ed 100644 (file)
@@ -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.
index 0c9d094b81ba69aa9a9882258d2469d8b1d0f64c..8f5788ca663c1aa5836873257ad695ce393115d6 100644 (file)
@@ -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));
index f8b9eaa927088eced2eb03eff8ba53af6d536dfc..59820a86b8be7b41bb63563181259ef87e343807 100644 (file)
@@ -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.
index 5e0945c55f24dc10a143ab010464692125cb8e75..80d5eb0255e9663da00d74f3868dcef68aacd8cc 100644 (file)
@@ -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.
index 8fad7972d4c37ad876a3671faa2603e10a374f0a..f53d9f5dcd6709eca3a614f4d1b37ab7028976a2 100644 (file)
@@ -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.
index c13ced36850f945ea409b5156e05409a3ee955b1..273c7790194e2c35dd67837929a7f01574a8ed82 100644 (file)
@@ -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);
index c31c163d0cca3545fe9671060a5110f6ee78aa85..032bf177b95eb8d17adf28316fc24f06737067b6 100644 (file)
@@ -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
 
 
index 6842954d4cbf8dcd30e282bce3adf1150995986e..e4a0cb4d41cc93a35385032b022e4de16b4a5ca2 100644 (file)
@@ -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.
index 7b7f25934913ac342a918cd2ca1cfc25cf805f9c..dbc4acc7d1a555630affdf59c245657ef98178c9 100644 (file)
@@ -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.
index 805493d85c541f43b2827868fe1da105614a3148..c369b5abfb362516a3b412fb8cc8c01a9b4293f9 100644 (file)
@@ -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);
index f810b34c78df0417ee2e8067aade5df8900026c3..502640d3018820fe22063b59b0a8ea6cde5c6526 100644 (file)
@@ -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));
index fe7a5ab538f110f49a83f35e711cc1a29662f75b..3bd4a74f003fd34a104ea7719a89ba032359782a 100644 (file)
@@ -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.
index f8bdad178976f5f27b8ce34fbe610aa07ac7e949..115608de43c26c21bc5bdadd2928196b3cf110d5 100644 (file)
@@ -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.
index 563aa1ad6386c14bf7fe42442ae493581db8c41e..2377e2f3167bccf53a440c9f8a7e5400d071f6a9 100644 (file)
@@ -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.
index 3e249e5d85ca8626c7eefebb7bbfd80fb7e93930..0bbcb3249dc6454587a781afaec828a4aa8d0610 100644 (file)
@@ -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));
index 46ac7290c3bba6d0629f89ab98114885aae3120a..51feb1b9e8f1c9e20e5f3ef989fc38be390a5133 100644 (file)
@@ -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));
index 826e79325f0af40c862b185c24dd92f9b49631c4..d47b05ae5cca51219abd864ce8dfec2d3ba1841f 100644 (file)
@@ -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);
index 30eabc91c91e0b288923212e6683a55a43002011..181e869ac755718eb413a1c5e88aa09fe8cb6add 100644 (file)
@@ -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));
index 990f209fec20c99f1af84dfa48115c5e16d9c219..5c28991e27b436ba4554f997218db116400236ed 100644 (file)
@@ -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));
index 70d4a20c02b7a3da01db0c3f676d8f5e778eec13..74183ec5a2e43381d7ba55182b4835b7e44af4c0 100644 (file)
@@ -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.
index 42fb41a6341e80c5e86c71cfbdd77a330dc3409a..921a9ec009d770d725151cb85f112cf821e95fab 100644 (file)
@@ -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.
index af08c5a7eb81eefdd0440d32e23b332fd08e4331..a0bd84376e75cf1182fcc366a376994ae51faa4f 100644 (file)
@@ -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