Cope with AIX's alignment woes by using _Pragma("pack").

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
pull/275/head
Tom Lane 7 days ago
parent bc60ee8606
commit ecae097252
  1. 68
      configure
  2. 32
      configure.ac
  3. 33
      meson.build
  4. 4
      src/include/c.h
  5. 19
      src/include/catalog/genbki.h
  6. 4
      src/include/catalog/pg_aggregate.h
  7. 4
      src/include/catalog/pg_am.h
  8. 4
      src/include/catalog/pg_amop.h
  9. 4
      src/include/catalog/pg_amproc.h
  10. 4
      src/include/catalog/pg_attrdef.h
  11. 4
      src/include/catalog/pg_attribute.h
  12. 4
      src/include/catalog/pg_auth_members.h
  13. 4
      src/include/catalog/pg_authid.h
  14. 4
      src/include/catalog/pg_cast.h
  15. 4
      src/include/catalog/pg_class.h
  16. 4
      src/include/catalog/pg_collation.h
  17. 4
      src/include/catalog/pg_constraint.h
  18. 4
      src/include/catalog/pg_conversion.h
  19. 4
      src/include/catalog/pg_database.h
  20. 4
      src/include/catalog/pg_db_role_setting.h
  21. 4
      src/include/catalog/pg_default_acl.h
  22. 4
      src/include/catalog/pg_depend.h
  23. 4
      src/include/catalog/pg_description.h
  24. 4
      src/include/catalog/pg_enum.h
  25. 4
      src/include/catalog/pg_event_trigger.h
  26. 4
      src/include/catalog/pg_extension.h
  27. 4
      src/include/catalog/pg_foreign_data_wrapper.h
  28. 4
      src/include/catalog/pg_foreign_server.h
  29. 4
      src/include/catalog/pg_foreign_table.h
  30. 4
      src/include/catalog/pg_index.h
  31. 4
      src/include/catalog/pg_inherits.h
  32. 4
      src/include/catalog/pg_init_privs.h
  33. 4
      src/include/catalog/pg_language.h
  34. 4
      src/include/catalog/pg_largeobject.h
  35. 4
      src/include/catalog/pg_largeobject_metadata.h
  36. 4
      src/include/catalog/pg_namespace.h
  37. 4
      src/include/catalog/pg_opclass.h
  38. 4
      src/include/catalog/pg_operator.h
  39. 4
      src/include/catalog/pg_opfamily.h
  40. 4
      src/include/catalog/pg_parameter_acl.h
  41. 4
      src/include/catalog/pg_partitioned_table.h
  42. 4
      src/include/catalog/pg_policy.h
  43. 4
      src/include/catalog/pg_proc.h
  44. 4
      src/include/catalog/pg_publication.h
  45. 4
      src/include/catalog/pg_publication_namespace.h
  46. 4
      src/include/catalog/pg_publication_rel.h
  47. 4
      src/include/catalog/pg_range.h
  48. 4
      src/include/catalog/pg_replication_origin.h
  49. 4
      src/include/catalog/pg_rewrite.h
  50. 4
      src/include/catalog/pg_seclabel.h
  51. 4
      src/include/catalog/pg_sequence.h
  52. 4
      src/include/catalog/pg_shdepend.h
  53. 4
      src/include/catalog/pg_shdescription.h
  54. 4
      src/include/catalog/pg_shseclabel.h
  55. 4
      src/include/catalog/pg_statistic.h
  56. 4
      src/include/catalog/pg_statistic_ext.h
  57. 4
      src/include/catalog/pg_statistic_ext_data.h
  58. 4
      src/include/catalog/pg_subscription.h
  59. 4
      src/include/catalog/pg_subscription_rel.h
  60. 4
      src/include/catalog/pg_tablespace.h
  61. 4
      src/include/catalog/pg_transform.h
  62. 4
      src/include/catalog/pg_trigger.h
  63. 4
      src/include/catalog/pg_ts_config.h
  64. 4
      src/include/catalog/pg_ts_config_map.h
  65. 4
      src/include/catalog/pg_ts_dict.h
  66. 4
      src/include/catalog/pg_ts_parser.h
  67. 4
      src/include/catalog/pg_ts_template.h
  68. 4
      src/include/catalog/pg_type.h
  69. 4
      src/include/catalog/pg_user_mapping.h
  70. 3
      src/include/pg_config.h.in

68
configure vendored

@ -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

@ -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.])

@ -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))

@ -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))

@ -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)

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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

@ -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.

@ -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.

@ -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.

@ -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))

@ -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.

@ -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.

@ -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.

@ -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.

@ -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);

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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.

@ -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));

@ -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.

@ -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));

@ -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.

@ -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.

@ -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.

@ -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);

@ -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

@ -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.

@ -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.

@ -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);

@ -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));

@ -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.

@ -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.

@ -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.

@ -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));

@ -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));

@ -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);

@ -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));

@ -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));

@ -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.

@ -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.

@ -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

Loading…
Cancel
Save