From cdea6681d3c61e4719135be54e4cc0506c82cdd9 Mon Sep 17 00:00:00 2001 From: John Naylor Date: Sun, 4 Mar 2018 02:41:03 +0700 Subject: [PATCH] Clean up header files and update comments The previous commit left behind detritus in the form of DATA() comments and blank lines. Other comments are now out of date or out of place. Remove or fix as appropriate. --- src/include/catalog/genbki.h | 8 +- src/include/catalog/indexing.h | 2 +- src/include/catalog/pg_aggregate.h | 53 +-- src/include/catalog/pg_am.h | 13 +- src/include/catalog/pg_amop.h | 372 +---------------- src/include/catalog/pg_amproc.h | 61 +-- src/include/catalog/pg_attrdef.h | 5 +- src/include/catalog/pg_attribute.h | 19 +- src/include/catalog/pg_auth_members.h | 6 +- src/include/catalog/pg_authid.h | 15 +- src/include/catalog/pg_cast.h | 97 +---- src/include/catalog/pg_class.h | 19 +- src/include/catalog/pg_collation.h | 11 +- src/include/catalog/pg_constraint.h | 13 +- src/include/catalog/pg_conversion.h | 10 +- src/include/catalog/pg_database.h | 5 +- src/include/catalog/pg_db_role_setting.h | 12 +- src/include/catalog/pg_default_acl.h | 9 +- src/include/catalog/pg_depend.h | 30 +- src/include/catalog/pg_description.h | 22 +- src/include/catalog/pg_enum.h | 13 +- src/include/catalog/pg_event_trigger.h | 5 +- src/include/catalog/pg_extension.h | 10 +- src/include/catalog/pg_foreign_data_wrapper.h | 5 +- src/include/catalog/pg_foreign_server.h | 4 +- src/include/catalog/pg_foreign_table.h | 4 +- src/include/catalog/pg_index.h | 5 +- src/include/catalog/pg_inherits.h | 10 +- src/include/catalog/pg_init_privs.h | 26 +- src/include/catalog/pg_language.h | 10 +- src/include/catalog/pg_largeobject.h | 3 - src/include/catalog/pg_largeobject_metadata.h | 5 +- src/include/catalog/pg_namespace.h | 12 +- src/include/catalog/pg_opclass.h | 27 +- src/include/catalog/pg_operator.h | 161 +------- src/include/catalog/pg_opfamily.h | 11 +- src/include/catalog/pg_partitioned_table.h | 5 +- src/include/catalog/pg_pltemplate.h | 12 +- src/include/catalog/pg_proc.h | 556 +------------------------- src/include/catalog/pg_publication.h | 4 +- src/include/catalog/pg_publication_rel.h | 4 +- src/include/catalog/pg_range.h | 15 +- src/include/catalog/pg_replication_origin.h | 9 +- src/include/catalog/pg_rewrite.h | 5 +- src/include/catalog/pg_shdepend.h | 24 +- src/include/catalog/pg_shdescription.h | 22 +- src/include/catalog/pg_statistic.h | 5 +- src/include/catalog/pg_statistic_ext.h | 5 +- src/include/catalog/pg_tablespace.h | 5 +- src/include/catalog/pg_transform.h | 4 +- src/include/catalog/pg_trigger.h | 5 +- src/include/catalog/pg_ts_config.h | 12 +- src/include/catalog/pg_ts_config_map.h | 13 +- src/include/catalog/pg_ts_dict.h | 13 +- src/include/catalog/pg_ts_parser.h | 13 +- src/include/catalog/pg_ts_template.h | 13 +- src/include/catalog/pg_type.h | 116 +----- src/include/catalog/pg_user_mapping.h | 4 +- src/include/catalog/toasting.h | 2 +- 59 files changed, 153 insertions(+), 1806 deletions(-) diff --git a/src/include/catalog/genbki.h b/src/include/catalog/genbki.h index 96ac402..9b769c2 100644 --- a/src/include/catalog/genbki.h +++ b/src/include/catalog/genbki.h @@ -3,7 +3,7 @@ * genbki.h * Required include file for all POSTGRES catalog header files * - * genbki.h defines CATALOG(), DATA(), BKI_BOOTSTRAP and related macros + * genbki.h defines CATALOG(), BKI_BOOTSTRAP and related macros * so that the catalog header files can be read by the C compiler. * (These same words are recognized by genbki.pl to build the BKI * bootstrap file from these header files.) @@ -44,10 +44,4 @@ */ #undef CATALOG_VARLEN -/* Declarations that provide the initial content of a catalog */ -/* In C, these need to expand into some harmless, repeatable declaration */ -#define DATA(x) extern int no_such_variable -#define DESCR(x) extern int no_such_variable -#define SHDESCR(x) extern int no_such_variable - #endif /* GENBKI_H */ diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h index 0bb8754..fb9dd23 100644 --- a/src/include/catalog/indexing.h +++ b/src/include/catalog/indexing.h @@ -43,7 +43,7 @@ extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid); /* * These macros are just to keep the C compiler from spitting up on the - * upcoming commands for genbki.pl. + * upcoming commands for Catalog.pm. */ #define DECLARE_INDEX(name,oid,decl) extern int no_such_variable #define DECLARE_UNIQUE_INDEX(name,oid,decl) extern int no_such_variable diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h index 0291032..4f9edf9 100644 --- a/src/include/catalog/pg_aggregate.h +++ b/src/include/catalog/pg_aggregate.h @@ -2,7 +2,6 @@ * * pg_aggregate.h * definition of the system "aggregate" relation (pg_aggregate) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_aggregate.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -144,52 +143,4 @@ typedef FormData_pg_aggregate *Form_pg_aggregate; #define AGGMODIFY_SHARABLE 's' #define AGGMODIFY_READ_WRITE 'w' - -/* ---------------- - * initial contents of pg_aggregate - * --------------- - */ - -/* avg */ - -/* sum */ - -/* max */ - -/* min */ - -/* count */ - -/* var_pop */ - -/* var_samp */ - -/* variance: historical Postgres syntax for var_samp */ - -/* stddev_pop */ - -/* stddev_samp */ - -/* stddev: historical Postgres syntax for stddev_samp */ - -/* SQL2003 binary regression aggregates */ - -/* boolean-and and boolean-or */ - -/* bitwise integer */ - -/* xml */ - -/* array */ - -/* text */ - -/* bytea */ - -/* json */ - -/* jsonb */ - -/* ordered-set and hypothetical-set aggregates */ - #endif /* PG_AGGREGATE_H */ diff --git a/src/include/catalog/pg_am.h b/src/include/catalog/pg_am.h index b85c653..fe59a29 100644 --- a/src/include/catalog/pg_am.h +++ b/src/include/catalog/pg_am.h @@ -2,7 +2,6 @@ * * pg_am.h * definition of the system "access method" relation (pg_am) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,11 +10,8 @@ * src/include/catalog/pg_am.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -60,11 +56,6 @@ typedef FormData_pg_am *Form_pg_am; */ #define AMTYPE_INDEX 'i' /* index access method */ -/* ---------------- - * initial contents of pg_am - * ---------------- - */ - #define BTREE_AM_OID 403 #define HASH_AM_OID 405 #define GIST_AM_OID 783 diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h index 4038d17..e978c32 100644 --- a/src/include/catalog/pg_amop.h +++ b/src/include/catalog/pg_amop.h @@ -2,7 +2,6 @@ * * pg_amop.h * definition of the system "amop" relation (pg_amop) - * along with the relation's initial contents. * * The amop table identifies the operators associated with each index operator * family and operator class (classes are subsets of families). An associated @@ -36,8 +35,8 @@ * src/include/catalog/pg_amop.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -90,371 +89,4 @@ typedef FormData_pg_amop *Form_pg_amop; #define Anum_pg_amop_amopmethod 7 #define Anum_pg_amop_amopsortfamily 8 -/* ---------------- - * initial contents of pg_amop - * ---------------- - */ - -/* - * btree integer_ops - */ - -/* default operators int2 */ -/* crosstype operators int24 */ -/* crosstype operators int28 */ -/* default operators int4 */ -/* crosstype operators int42 */ -/* crosstype operators int48 */ -/* default operators int8 */ -/* crosstype operators int82 */ -/* crosstype operators int84 */ - -/* - * btree oid_ops - */ - - -/* - * btree tid_ops - */ - - -/* - * btree oidvector_ops - */ - - -/* - * btree float_ops - */ - -/* default operators float4 */ -/* crosstype operators float48 */ -/* default operators float8 */ -/* crosstype operators float84 */ - -/* - * btree char_ops - */ - - -/* - * btree name_ops - */ - - -/* - * btree text_ops - */ - - -/* - * btree bpchar_ops - */ - - -/* - * btree bytea_ops - */ - - -/* - * btree abstime_ops - */ - - -/* - * btree datetime_ops - */ - -/* default operators date */ -/* crosstype operators vs timestamp */ -/* crosstype operators vs timestamptz */ -/* default operators timestamp */ -/* crosstype operators vs date */ -/* crosstype operators vs timestamptz */ -/* default operators timestamptz */ -/* crosstype operators vs date */ -/* crosstype operators vs timestamp */ - -/* - * btree time_ops - */ - - -/* - * btree timetz_ops - */ - - -/* - * btree interval_ops - */ - - -/* - * btree macaddr - */ - - -/* - * btree macaddr8 - */ - - -/* - * btree network - */ - - -/* - * btree numeric - */ - - -/* - * btree bool - */ - - -/* - * btree bit - */ - - -/* - * btree varbit - */ - - -/* - * btree text pattern - */ - - -/* - * btree bpchar pattern - */ - - -/* - * btree money_ops - */ - - -/* - * btree reltime_ops - */ - - -/* - * btree tinterval_ops - */ - - -/* - * btree array_ops - */ - - -/* - * btree record_ops - */ - - -/* - * btree record_image_ops - */ - - -/* - * btree uuid_ops - */ - - -/* - * btree pg_lsn_ops - */ - - -/* - * hash index _ops - */ - -/* bpchar_ops */ -/* char_ops */ -/* date_ops */ -/* float_ops */ -/* network_ops */ -/* integer_ops */ -/* interval_ops */ -/* macaddr_ops */ -/* macaddr8_ops */ -/* name_ops */ -/* oid_ops */ -/* oidvector_ops */ -/* text_ops */ -/* time_ops */ -/* timestamptz_ops */ -/* timetz_ops */ -/* timestamp_ops */ -/* bool_ops */ -/* bytea_ops */ -/* xid_ops */ -/* cid_ops */ -/* abstime_ops */ -/* reltime_ops */ -/* text_pattern_ops */ -/* bpchar_pattern_ops */ -/* aclitem_ops */ -/* uuid_ops */ -/* pg_lsn_ops */ -/* numeric_ops */ -/* array_ops */ - - -/* - * gist box_ops - */ - - -/* - * gist point_ops - */ - - -/* - * gist poly_ops (supports polygons) - */ - - -/* - * gist circle_ops - */ - - -/* - * gin array_ops - */ - -/* - * btree enum_ops - */ - -/* - * hash enum_ops - */ - -/* - * btree tsvector_ops - */ - -/* - * GiST tsvector_ops - */ - -/* - * GIN tsvector_ops - */ - -/* - * btree tsquery_ops - */ - -/* - * GiST tsquery_ops - */ - -/* - * btree range_ops - */ - -/* - * hash range_ops - */ - -/* - * GiST range_ops - */ - -/* - * SP-GiST quad_point_ops - */ - -/* - * SP-GiST kd_point_ops - */ - -/* - * SP-GiST text_ops - */ - -/* - * btree jsonb_ops - */ - -/* - * hash jsonb_ops - */ - -/* - * GIN jsonb_ops - */ - -/* - * GIN jsonb_path_ops - */ - -/* - * SP-GiST range_ops - */ - -/* - * SP-GiST box_ops - */ - -/* - * SP-GiST poly_ops (supports polygons) - */ - -/* - * GiST inet_ops - */ - -/* - * SP-GiST inet_ops - */ - -/* BRIN opclasses */ -/* minmax bytea */ -/* minmax "char" */ -/* minmax name */ -/* minmax integer */ - -/* minmax text */ -/* minmax oid */ -/* minmax tid */ -/* minmax float (float4, float8) */ - -/* minmax abstime */ -/* minmax reltime */ -/* minmax macaddr */ -/* minmax macaddr8 */ -/* minmax inet */ -/* inclusion inet */ -/* minmax character */ -/* minmax time without time zone */ -/* minmax datetime (date, timestamp, timestamptz) */ - -/* minmax interval */ -/* minmax time with time zone */ -/* minmax bit */ -/* minmax bit varying */ -/* minmax numeric */ -/* minmax uuid */ -/* inclusion range types */ -/* minmax pg_lsn */ -/* inclusion box */ -/* we could, but choose not to, supply entries for strategies 13 and 14 */ - #endif /* PG_AMOP_H */ diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h index 15edd86..83ce03b 100644 --- a/src/include/catalog/pg_amproc.h +++ b/src/include/catalog/pg_amproc.h @@ -2,7 +2,6 @@ * * pg_amproc.h * definition of the system "amproc" relation (pg_amproc) - * along with the relation's initial contents. * * The amproc table identifies support procedures associated with index * operator families and classes. These procedures can't be listed in pg_amop @@ -25,8 +24,8 @@ * src/include/catalog/pg_amproc.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -69,60 +68,4 @@ typedef FormData_pg_amproc *Form_pg_amproc; #define Anum_pg_amproc_amprocnum 4 #define Anum_pg_amproc_amproc 5 -/* ---------------- - * initial contents of pg_amproc - * ---------------- - */ - -/* btree */ - - -/* hash */ - - -/* gist */ - - -/* gin */ - -/* sp-gist */ - -/* BRIN opclasses */ -/* minmax bytea */ -/* minmax "char" */ -/* minmax name */ -/* minmax integer: int2, int4, int8 */ - - - -/* minmax text */ -/* minmax oid */ -/* minmax tid */ -/* minmax float */ - - - - -/* minmax abstime */ -/* minmax reltime */ -/* minmax macaddr */ -/* minmax macaddr8 */ -/* minmax inet */ -/* inclusion inet */ -/* minmax character */ -/* minmax time without time zone */ -/* minmax datetime (date, timestamp, timestamptz) */ - - - -/* minmax interval */ -/* minmax time with time zone */ -/* minmax bit */ -/* minmax bit varying */ -/* minmax numeric */ -/* minmax uuid */ -/* inclusion range types */ -/* minmax pg_lsn */ -/* inclusion box */ - #endif /* PG_AMPROC_H */ diff --git a/src/include/catalog/pg_attrdef.h b/src/include/catalog/pg_attrdef.h index 8a8b8ca..3aab48d 100644 --- a/src/include/catalog/pg_attrdef.h +++ b/src/include/catalog/pg_attrdef.h @@ -2,7 +2,6 @@ * * pg_attrdef.h * definition of the system "attribute defaults" relation (pg_attrdef) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_attrdef.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index 8159383..3c78871 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -2,7 +2,10 @@ * * pg_attribute.h * definition of the system "attribute" relation (pg_attribute) - * along with the relation's initial contents. + * + * The initial contents of pg_attribute are generated at compile time by + * genbki.pl, so there is no pg_attribute.dat file. Only "bootstrapped" + * relations need be included. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +14,8 @@ * src/include/catalog/pg_attribute.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -215,16 +218,6 @@ typedef FormData_pg_attribute *Form_pg_attribute; #define Anum_pg_attribute_attoptions 21 #define Anum_pg_attribute_attfdwoptions 22 - -/* ---------------- - * initial contents of pg_attribute - * - * The initial contents of pg_attribute are generated at compile time by - * genbki.pl. Only "bootstrapped" relations need be included. - * ---------------- - */ - - #define ATTRIBUTE_IDENTITY_ALWAYS 'a' #define ATTRIBUTE_IDENTITY_BY_DEFAULT 'd' diff --git a/src/include/catalog/pg_auth_members.h b/src/include/catalog/pg_auth_members.h index ae3c14a..a702dff 100644 --- a/src/include/catalog/pg_auth_members.h +++ b/src/include/catalog/pg_auth_members.h @@ -2,7 +2,7 @@ * * pg_auth_members.h * definition of the system "authorization identifier members" relation - * (pg_auth_members) along with the relation's initial contents. + * (pg_auth_members). * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +11,8 @@ * src/include/catalog/pg_auth_members.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_authid.h b/src/include/catalog/pg_authid.h index b5f6602..b101e30 100644 --- a/src/include/catalog/pg_authid.h +++ b/src/include/catalog/pg_authid.h @@ -2,7 +2,6 @@ * * pg_authid.h * definition of the system "authorization identifier" relation (pg_authid) - * along with the relation's initial contents. * * pg_shadow and pg_group are now publicly accessible views on pg_authid. * @@ -13,8 +12,8 @@ * src/include/catalog/pg_authid.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -88,16 +87,6 @@ typedef FormData_pg_authid *Form_pg_authid; #define Anum_pg_authid_rolpassword 10 #define Anum_pg_authid_rolvaliduntil 11 -/* ---------------- - * initial contents of pg_authid - * - * The uppercase quantities will be replaced at initdb time with - * user choices. - * - * The C code typically refers to these roles using the #define symbols, - * so be sure to keep those in sync with the DATA lines. - * ---------------- - */ #define BOOTSTRAP_SUPERUSERID 10 #define DEFAULT_ROLE_MONITOR 3373 #define DEFAULT_ROLE_READ_ALL_SETTINGS 3374 diff --git a/src/include/catalog/pg_cast.h b/src/include/catalog/pg_cast.h index 597079c..1930d4b 100644 --- a/src/include/catalog/pg_cast.h +++ b/src/include/catalog/pg_cast.h @@ -2,7 +2,6 @@ * * pg_cast.h * definition of the system "type casts" relation (pg_cast) - * along with the relation's initial contents. * * As of Postgres 8.0, pg_cast describes not only type coercion functions * but also length coercion functions. @@ -13,8 +12,8 @@ * src/include/catalog/pg_cast.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -81,96 +80,4 @@ typedef enum CoercionMethod #define Anum_pg_cast_castcontext 4 #define Anum_pg_cast_castmethod 5 -/* ---------------- - * initial contents of pg_cast - * - * Note: this table has OIDs, but we don't bother to assign them manually, - * since nothing needs to know the specific OID of any built-in cast. - * ---------------- - */ - -/* - * Numeric category: implicit casts are allowed in the direction - * int2->int4->int8->numeric->float4->float8, while casts in the - * reverse direction are assignment-only. - */ - -/* Allow explicit coercions between int4 and bool */ - -/* - * OID category: allow implicit conversion from any integral type (including - * int8, to support OID literals > 2G) to OID, as well as assignment coercion - * from OID to int4 or int8. Similarly for each OID-alias type. Also allow - * implicit coercions between OID and each OID-alias type, as well as - * regproc<->regprocedure and regoper<->regoperator. (Other coercions - * between alias types must pass through OID.) Lastly, there are implicit - * casts from text and varchar to regclass, which exist mainly to support - * legacy forms of nextval() and related functions. - */ - -/* - * String category - */ - -/* Allow explicit coercions between int4 and "char" */ - -/* pg_node_tree can be coerced to, but not from, text */ - -/* pg_ndistinct can be coerced to, but not from, bytea and text */ - -/* pg_dependencies can be coerced to, but not from, bytea and text */ - -/* - * Datetime category - */ -/* Cross-category casts between int4 and abstime, reltime */ - -/* - * Geometric category - */ - -/* - * MAC address category - */ - -/* - * INET category - */ - -/* - * BitString category - */ -/* Cross-category casts between bit and int4, int8 */ - -/* - * Cross-category casts to and from TEXT - * - * We need entries here only for a few specialized cases where the behavior - * of the cast function differs from the datatype's I/O functions. Otherwise, - * parse_coerce.c will generate CoerceViaIO operations without any prompting. - * - * Note that the castcontext values specified here should be no stronger than - * parse_coerce.c's automatic casts ('a' to text, 'e' from text) else odd - * behavior will ensue when the automatic cast is applied instead of the - * pg_cast entry! - */ - -/* - * Cross-category casts to and from VARCHAR - * - * We support all the same casts as for TEXT. - */ - -/* - * Cross-category casts to and from BPCHAR - * - * We support all the same casts as for TEXT. - */ - -/* - * Length-coercion functions - */ - -/* json to/from jsonb */ - #endif /* PG_CAST_H */ diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 99bda41..7bc09bb 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -2,7 +2,6 @@ * * pg_class.h * definition of the system "relation" relation (pg_class) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_class.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -134,20 +133,6 @@ typedef FormData_pg_class *Form_pg_class; #define Anum_pg_class_reloptions 32 #define Anum_pg_class_relpartbound 33 -/* ---------------- - * initial contents of pg_class - * - * NOTE: only "bootstrapped" relations need to be declared here. Be sure that - * the OIDs listed here match those given in their CATALOG macros, and that - * the relnatts values are correct. - * ---------------- - */ - -/* - * Note: "3" in the relfrozenxid column stands for FirstNormalTransactionId; - * similarly, "1" in relminmxid stands for FirstMultiXactId - */ - #define RELKIND_RELATION 'r' /* ordinary table */ #define RELKIND_INDEX 'i' /* secondary index */ diff --git a/src/include/catalog/pg_collation.h b/src/include/catalog/pg_collation.h index beef6b5..50cbe1e 100644 --- a/src/include/catalog/pg_collation.h +++ b/src/include/catalog/pg_collation.h @@ -2,7 +2,6 @@ * * pg_collation.h * definition of the system "collation" relation (pg_collation) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -12,8 +11,8 @@ * src/include/catalog/pg_collation.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -65,16 +64,10 @@ typedef FormData_pg_collation *Form_pg_collation; #define Anum_pg_collation_collctype 7 #define Anum_pg_collation_collversion 8 -/* ---------------- - * initial contents of pg_collation - * ---------------- - */ - #define DEFAULT_COLLATION_OID 100 #define C_COLLATION_OID 950 #define POSIX_COLLATION_OID 951 - #define COLLPROVIDER_DEFAULT 'd' #define COLLPROVIDER_ICU 'i' #define COLLPROVIDER_LIBC 'c' diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h index 8fca86d..41d97d4 100644 --- a/src/include/catalog/pg_constraint.h +++ b/src/include/catalog/pg_constraint.h @@ -2,7 +2,6 @@ * * pg_constraint.h * definition of the system "constraint" relation (pg_constraint) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_constraint.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -176,14 +175,6 @@ typedef FormData_pg_constraint *Form_pg_constraint; #define Anum_pg_constraint_conbin 23 #define Anum_pg_constraint_consrc 24 -/* ---------------- - * initial contents of pg_constraint - * ---------------- - */ - -/* nothing, at present */ - - /* Valid values for contype */ #define CONSTRAINT_CHECK 'c' #define CONSTRAINT_FOREIGN 'f' diff --git a/src/include/catalog/pg_conversion.h b/src/include/catalog/pg_conversion.h index 29f3c9d..88098fa 100644 --- a/src/include/catalog/pg_conversion.h +++ b/src/include/catalog/pg_conversion.h @@ -2,7 +2,6 @@ * * pg_conversion.h * definition of the system "conversion" relation (pg_conversion) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_conversion.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -69,9 +68,4 @@ typedef FormData_pg_conversion *Form_pg_conversion; #define Anum_pg_conversion_conproc 6 #define Anum_pg_conversion_condefault 7 -/* ---------------- - * initial contents of pg_conversion - * --------------- - */ - #endif /* PG_CONVERSION_H */ diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h index bbf131a..b7972fa 100644 --- a/src/include/catalog/pg_database.h +++ b/src/include/catalog/pg_database.h @@ -2,7 +2,6 @@ * * pg_database.h * definition of the system "database" relation (pg_database) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_database.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_db_role_setting.h b/src/include/catalog/pg_db_role_setting.h index 86cc17d..09546bd 100644 --- a/src/include/catalog/pg_db_role_setting.h +++ b/src/include/catalog/pg_db_role_setting.h @@ -10,11 +10,8 @@ * src/include/catalog/pg_db_role_setting.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -53,11 +50,6 @@ typedef FormData_pg_db_role_setting * Form_pg_db_role_setting; #define Anum_pg_db_role_setting_setrole 2 #define Anum_pg_db_role_setting_setconfig 3 -/* ---------------- - * initial contents of pg_db_role_setting are NOTHING - * ---------------- - */ - /* * prototypes for functions in pg_db_role_setting.h */ diff --git a/src/include/catalog/pg_default_acl.h b/src/include/catalog/pg_default_acl.h index 11b3060..7778276 100644 --- a/src/include/catalog/pg_default_acl.h +++ b/src/include/catalog/pg_default_acl.h @@ -10,8 +10,8 @@ * src/include/catalog/pg_default_acl.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -56,11 +56,6 @@ typedef FormData_pg_default_acl *Form_pg_default_acl; #define Anum_pg_default_acl_defaclobjtype 3 #define Anum_pg_default_acl_defaclacl 4 -/* ---------------- - * pg_default_acl has no initial contents - * ---------------- - */ - /* * Types of objects for which the user is allowed to specify default * permissions through pg_default_acl. These codes are used in the diff --git a/src/include/catalog/pg_depend.h b/src/include/catalog/pg_depend.h index be3867b..7c60e63 100644 --- a/src/include/catalog/pg_depend.h +++ b/src/include/catalog/pg_depend.h @@ -2,7 +2,18 @@ * * pg_depend.h * definition of the system "dependency" relation (pg_depend) - * along with the relation's initial contents. + * + * pg_depend has no preloaded contents, so there is no pg_depend.dat + * file; system-defined dependencies are loaded into it during a late stage + * of the initdb process. + * + * NOTE: we do not represent all possible dependency pairs in pg_depend; + * for example, there's not much value in creating an explicit dependency + * from an attribute to its relation. Usually we make a dependency for + * cases where the relationship is conditional rather than essential + * (for example, not all triggers are dependent on constraints, but all + * attributes are dependent on relations) or where the dependency is not + * convenient to find from the contents of other catalogs. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +22,8 @@ * src/include/catalog/pg_depend.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -74,17 +85,4 @@ typedef FormData_pg_depend *Form_pg_depend; #define Anum_pg_depend_deptype 7 -/* - * pg_depend has no preloaded contents; system-defined dependencies are - * loaded into it during a late stage of the initdb process. - * - * NOTE: we do not represent all possible dependency pairs in pg_depend; - * for example, there's not much value in creating an explicit dependency - * from an attribute to its relation. Usually we make a dependency for - * cases where the relationship is conditional rather than essential - * (for example, not all triggers are dependent on constraints, but all - * attributes are dependent on relations) or where the dependency is not - * convenient to find from the contents of other catalogs. - */ - #endif /* PG_DEPEND_H */ diff --git a/src/include/catalog/pg_description.h b/src/include/catalog/pg_description.h index d291000..71eed4e 100644 --- a/src/include/catalog/pg_description.h +++ b/src/include/catalog/pg_description.h @@ -3,6 +3,10 @@ * pg_description.h * definition of the system "description" relation (pg_description) * + * Because the contents of this table are taken from the *.dat files + * of other catalogs, there is no pg_description.dat file. The initial + * contents are assembled by genbki.pl and loaded during initdb. + * * NOTE: an object is identified by the OID of the row that primarily * defines the object, plus the OID of the table that that row appears in. * For example, a function is identified by the OID of its pg_proc row @@ -25,11 +29,8 @@ * src/include/catalog/pg_description.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -73,15 +74,4 @@ typedef FormData_pg_description * Form_pg_description; #define Anum_pg_description_objsubid 3 #define Anum_pg_description_description 4 -/* ---------------- - * initial contents of pg_description - * ---------------- - */ - -/* - * Because the contents of this table are taken from the other *.h files, - * there is no initialization here. The initial contents are extracted - * by genbki.pl and loaded during initdb. - */ - #endif /* PG_DESCRIPTION_H */ diff --git a/src/include/catalog/pg_enum.h b/src/include/catalog/pg_enum.h index a65a8f4..3327688 100644 --- a/src/include/catalog/pg_enum.h +++ b/src/include/catalog/pg_enum.h @@ -2,7 +2,6 @@ * * pg_enum.h * definition of the system "enum" relation (pg_enum) - * along with the relation's initial contents. * * * Copyright (c) 2006-2018, PostgreSQL Global Development Group @@ -10,11 +9,8 @@ * src/include/catalog/pg_enum.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -54,11 +50,6 @@ typedef FormData_pg_enum *Form_pg_enum; #define Anum_pg_enum_enumsortorder 2 #define Anum_pg_enum_enumlabel 3 -/* ---------------- - * pg_enum has no initial contents - * ---------------- - */ - /* * prototypes for functions in pg_enum.c */ diff --git a/src/include/catalog/pg_event_trigger.h b/src/include/catalog/pg_event_trigger.h index e03c819..20e7e38 100644 --- a/src/include/catalog/pg_event_trigger.h +++ b/src/include/catalog/pg_event_trigger.h @@ -2,7 +2,6 @@ * * pg_event_trigger.h * definition of the system "event trigger" relation (pg_event_trigger) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_event_trigger.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_extension.h b/src/include/catalog/pg_extension.h index 9ca6ca7..c2d528f 100644 --- a/src/include/catalog/pg_extension.h +++ b/src/include/catalog/pg_extension.h @@ -2,7 +2,6 @@ * * pg_extension.h * definition of the system "extension" relation (pg_extension) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_extension.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -64,9 +63,4 @@ typedef FormData_pg_extension *Form_pg_extension; #define Anum_pg_extension_extconfig 6 #define Anum_pg_extension_extcondition 7 -/* ---------------- - * pg_extension has no initial contents - * ---------------- - */ - #endif /* PG_EXTENSION_H */ diff --git a/src/include/catalog/pg_foreign_data_wrapper.h b/src/include/catalog/pg_foreign_data_wrapper.h index dd00586..6cf321d 100644 --- a/src/include/catalog/pg_foreign_data_wrapper.h +++ b/src/include/catalog/pg_foreign_data_wrapper.h @@ -2,7 +2,6 @@ * * pg_foreign_data_wrapper.h * definition of the system "foreign-data wrapper" relation (pg_foreign_data_wrapper) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_foreign_data_wrapper.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_foreign_server.h b/src/include/catalog/pg_foreign_server.h index a8c9e87..f909b26 100644 --- a/src/include/catalog/pg_foreign_server.h +++ b/src/include/catalog/pg_foreign_server.h @@ -9,8 +9,8 @@ * src/include/catalog/pg_foreign_server.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_foreign_table.h b/src/include/catalog/pg_foreign_table.h index 210e77b..9bee001 100644 --- a/src/include/catalog/pg_foreign_table.h +++ b/src/include/catalog/pg_foreign_table.h @@ -9,8 +9,8 @@ * src/include/catalog/pg_foreign_table.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h index 057a9f7..ef0dea6 100644 --- a/src/include/catalog/pg_index.h +++ b/src/include/catalog/pg_index.h @@ -2,7 +2,6 @@ * * pg_index.h * definition of the system "index" relation (pg_index) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_index.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_inherits.h b/src/include/catalog/pg_inherits.h index 3c572f4..3af1647 100644 --- a/src/include/catalog/pg_inherits.h +++ b/src/include/catalog/pg_inherits.h @@ -2,7 +2,6 @@ * * pg_inherits.h * definition of the system "inherits" relation (pg_inherits) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_inherits.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -51,9 +50,4 @@ typedef FormData_pg_inherits *Form_pg_inherits; #define Anum_pg_inherits_inhparent 2 #define Anum_pg_inherits_inhseqno 3 -/* ---------------- - * pg_inherits has no initial contents - * ---------------- - */ - #endif /* PG_INHERITS_H */ diff --git a/src/include/catalog/pg_init_privs.h b/src/include/catalog/pg_init_privs.h index 65f02c2..51adc7a 100644 --- a/src/include/catalog/pg_init_privs.h +++ b/src/include/catalog/pg_init_privs.h @@ -15,17 +15,20 @@ * for a table itself, so that it is distinct from any column privilege. * Currently, objsubid is unused and zero for all other kinds of objects. * + * Because the contents of this table depend on what is done with the other + * objects in the system (and, in particular, may change due to changes in + * system_views.sql), there is no pg_init_privs.dat file. The initial contents + * are loaded near the end of initdb. + * + * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/catalog/pg_init_privs.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -84,17 +87,4 @@ typedef enum InitPrivsType INITPRIVS_EXTENSION = 'e' } InitPrivsType; -/* ---------------- - * initial contents of pg_init_privs - * ---------------- - */ - -/* - * Because the contents of this table depend on what is done with the other - * objects in the system (and, in particular, may change due to changes is - * system_views.sql), there is no initialization here. - * - * The initial contents are loaded near the end of initdb. - */ - #endif /* PG_INIT_PRIVS_H */ diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h index 614ca67..5f82158 100644 --- a/src/include/catalog/pg_language.h +++ b/src/include/catalog/pg_language.h @@ -2,7 +2,6 @@ * * pg_language.h * definition of the system "language" relation (pg_language) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_language.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -64,11 +63,6 @@ typedef FormData_pg_language *Form_pg_language; #define Anum_pg_language_lanvalidator 7 #define Anum_pg_language_lanacl 8 -/* ---------------- - * initial contents of pg_language - * ---------------- - */ - #define INTERNALlanguageId 12 #define ClanguageId 13 #define SQLlanguageId 14 diff --git a/src/include/catalog/pg_largeobject.h b/src/include/catalog/pg_largeobject.h index 0a15649..1857ca4 100644 --- a/src/include/catalog/pg_largeobject.h +++ b/src/include/catalog/pg_largeobject.h @@ -2,7 +2,6 @@ * * pg_largeobject.h * definition of the system "largeobject" relation (pg_largeobject) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,6 @@ * src/include/catalog/pg_largeobject.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_largeobject_metadata.h b/src/include/catalog/pg_largeobject_metadata.h index 4535b51..0cf7bcd 100644 --- a/src/include/catalog/pg_largeobject_metadata.h +++ b/src/include/catalog/pg_largeobject_metadata.h @@ -2,7 +2,6 @@ * * pg_largeobject_metadata.h * definition of the system "largeobject_metadata" relation (pg_largeobject_metadata) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_largeobject_metadata.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_namespace.h b/src/include/catalog/pg_namespace.h index 5b6f9eb..19b559f9 100644 --- a/src/include/catalog/pg_namespace.h +++ b/src/include/catalog/pg_namespace.h @@ -2,7 +2,6 @@ * * pg_namespace.h * definition of the system "namespace" relation (pg_namespace) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_namespace.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -60,17 +59,10 @@ typedef FormData_pg_namespace *Form_pg_namespace; #define Anum_pg_namespace_nspowner 2 #define Anum_pg_namespace_nspacl 3 - -/* ---------------- - * initial contents of pg_namespace - * --------------- - */ - #define PG_CATALOG_NAMESPACE 11 #define PG_TOAST_NAMESPACE 99 #define PG_PUBLIC_NAMESPACE 2200 - /* * prototypes for functions in pg_namespace.c */ diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h index 5cff871..b10ceb9 100644 --- a/src/include/catalog/pg_opclass.h +++ b/src/include/catalog/pg_opclass.h @@ -2,7 +2,6 @@ * * pg_opclass.h * definition of the system "opclass" relation (pg_opclass) - * along with the relation's initial contents. * * The primary key for this table is --- * that is, there is a row for each valid combination of opclass name and @@ -31,8 +30,8 @@ * src/include/catalog/pg_opclass.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -81,37 +80,15 @@ typedef FormData_pg_opclass *Form_pg_opclass; #define Anum_pg_opclass_opcdefault 7 #define Anum_pg_opclass_opckeytype 8 -/* ---------------- - * initial contents of pg_opclass - * - * Note: we hard-wire an OID only for a few entries that have to be explicitly - * referenced in the C code or in built-in catalog entries. The rest get OIDs - * assigned on-the-fly during initdb. - * ---------------- - */ - #define DATE_BTREE_OPS_OID 3122 #define FLOAT8_BTREE_OPS_OID 3123 #define INT2_BTREE_OPS_OID 1979 #define INT4_BTREE_OPS_OID 1978 #define INT8_BTREE_OPS_OID 3124 -/* - * Here's an ugly little hack to save space in the system catalog indexes. - * btree doesn't ordinarily allow a storage type different from input type; - * but cstring and name are the same thing except for trailing padding, - * and we can safely omit that within an index entry. So we declare the - * btree opclass for name as using cstring storage type. - */ #define NUMERIC_BTREE_OPS_OID 3125 #define OID_BTREE_OPS_OID 1981 #define TEXT_BTREE_OPS_OID 3126 #define TIMESTAMPTZ_BTREE_OPS_OID 3127 #define TIMESTAMP_BTREE_OPS_OID 3128 -/* BRIN operator classes */ -/* no brin opclass for bool */ -/* no brin opclass for record, anyarray */ -/* no brin opclass for enum, tsvector, tsquery, jsonb */ -/* no brin opclass for the geometric types except box */ - #endif /* PG_OPCLASS_H */ diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index d9f303b..cbe6884 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -2,7 +2,6 @@ * * pg_operator.h * definition of the system "operator" relation (pg_operator) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,11 +10,8 @@ * src/include/catalog/pg_operator.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -77,195 +73,42 @@ typedef FormData_pg_operator *Form_pg_operator; #define Anum_pg_operator_oprrest 13 #define Anum_pg_operator_oprjoin 14 -/* ---------------- - * initial contents of pg_operator - * ---------------- - */ - -/* - * Note: every entry in pg_operator.h is expected to have a DESCR() comment. - * If the operator is a deprecated equivalent of some other entry, be sure - * to comment it as such so that initdb doesn't think it's a preferred name - * for the underlying function. - */ - - #define BooleanNotEqualOperator 85 #define BooleanEqualOperator 91 - #define Int4EqualOperator 96 #define Int4LessOperator 97 #define TextEqualOperator 98 - - - #define TIDEqualOperator 387 #define TIDLessOperator 2799 - #define Int8LessOperator 412 - - - - - - - - #define OID_NAME_REGEXEQ_OP 639 #define OID_TEXT_REGEXEQ_OP 641 - - #define Float8LessOperator 672 - - - - - - -/* add translation/rotation/scaling operators for geometric types. - thomas 97/05/10 */ - - -/* additional operators for geometric types - thomas 1997-07-09 */ - - - - - -/* additional geometric operators - thomas 1997-07-09 */ - - #define OID_BPCHAR_REGEXEQ_OP 1055 - -/* generic array comparison operators */ #define ARRAY_EQ_OP 1070 #define ARRAY_LT_OP 1072 #define ARRAY_GT_OP 1073 - -/* date operators */ - -/* time operators */ - -/* timetz operators */ - -/* float48 operators */ - -/* float84 operators */ - - -/* LIKE hacks by Keith Parks. */ #define OID_NAME_LIKE_OP 1207 #define OID_TEXT_LIKE_OP 1209 #define OID_BPCHAR_LIKE_OP 1211 - -/* case-insensitive regex hacks */ #define OID_NAME_ICREGEXEQ_OP 1226 #define OID_TEXT_ICREGEXEQ_OP 1228 #define OID_BPCHAR_ICREGEXEQ_OP 1234 - -/* timestamptz operators */ - -/* interval operators */ - - - - -/* additional geometric operators - thomas 97/04/18 */ - - - - -/* additional geometric operators - thomas 1997-07-09 */ - - - - - - - - -/* MACADDR type */ - - -/* MACADDR8 type */ - - -/* INET type (these also support CIDR via implicit cast) */ #define OID_INET_SUB_OP 931 #define OID_INET_SUBEQ_OP 932 #define OID_INET_SUP_OP 933 #define OID_INET_SUPEQ_OP 934 #define OID_INET_OVERLAP_OP 3552 - - -/* case-insensitive LIKE hacks */ #define OID_NAME_ICLIKE_OP 1625 #define OID_TEXT_ICLIKE_OP 1627 #define OID_BPCHAR_ICLIKE_OP 1629 - -/* NUMERIC type - OID's 1700-1799 */ - - - - - - - - - - - -/* bytea operators */ - #define OID_BYTEA_LIKE_OP 2016 - -/* timestamp operators */ - -/* character-by-character (not collation order) comparison operators for character types */ - - - -/* crosstype operations for date vs. timestamp and timestamptz */ - - - - - -/* crosstype operations for timestamp vs. timestamptz */ - - - -/* formerly-missing interval + datetime operators */ - -/* new operators for Y-direction rtree opfamilies */ - -/* overlap/contains/contained for arrays */ #define OID_ARRAY_OVERLAP_OP 2750 #define OID_ARRAY_CONTAINS_OP 2751 #define OID_ARRAY_CONTAINED_OP 2752 - -/* capturing operators to preserve pre-8.3 behavior of text concatenation */ - -/* obsolete names for contains/contained-by operators; remove these someday */ - -/* uuid operators */ - -/* pg_lsn operators */ - -/* enum operators */ - -/* - * tsearch operations - */ -/* <-> operation calls tsquery_phrase, but function is polymorphic. So, point to OID of the tsquery_phrase */ - -/* generic record comparison operators */ #define RECORD_EQ_OP 2988 #define RECORD_LT_OP 2990 #define RECORD_GT_OP 2991 - -/* byte-oriented tests for identical rows and fast sorting */ - -/* generic range type operators */ #define OID_RANGE_LESS_OP 3884 #define OID_RANGE_LESS_EQUAL_OP 3885 #define OID_RANGE_GREATER_EQUAL_OP 3886 diff --git a/src/include/catalog/pg_opfamily.h b/src/include/catalog/pg_opfamily.h index 86f86e3..e9d8d3d 100644 --- a/src/include/catalog/pg_opfamily.h +++ b/src/include/catalog/pg_opfamily.h @@ -2,7 +2,6 @@ * * pg_opfamily.h * definition of the system "opfamily" relation (pg_opfamily) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_opfamily.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -53,11 +52,6 @@ typedef FormData_pg_opfamily *Form_pg_opfamily; #define Anum_pg_opfamily_opfnamespace 3 #define Anum_pg_opfamily_opfowner 4 -/* ---------------- - * initial contents of pg_opfamily - * ---------------- - */ - #define BOOL_BTREE_FAM_OID 424 #define BPCHAR_BTREE_FAM_OID 426 #define BYTEA_BTREE_FAM_OID 428 @@ -71,5 +65,4 @@ typedef FormData_pg_opfamily *Form_pg_opfamily; #define BOOL_HASH_FAM_OID 2222 #define TEXT_SPGIST_FAM_OID 4017 - #endif /* PG_OPFAMILY_H */ diff --git a/src/include/catalog/pg_partitioned_table.h b/src/include/catalog/pg_partitioned_table.h index 9dc66f4..a8bda00 100644 --- a/src/include/catalog/pg_partitioned_table.h +++ b/src/include/catalog/pg_partitioned_table.h @@ -2,7 +2,6 @@ * * pg_partitioned_table.h * definition of the system "partitioned table" relation - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -10,8 +9,8 @@ * src/include/catalog/pg_partitioned_table.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_pltemplate.h b/src/include/catalog/pg_pltemplate.h index 8995fe9..b1d9ece 100644 --- a/src/include/catalog/pg_pltemplate.h +++ b/src/include/catalog/pg_pltemplate.h @@ -2,7 +2,6 @@ * * pg_pltemplate.h * definition of the system "PL template" relation (pg_pltemplate) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_pltemplate.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -65,11 +64,4 @@ typedef FormData_pg_pltemplate *Form_pg_pltemplate; #define Anum_pg_pltemplate_tmpllibrary 7 #define Anum_pg_pltemplate_tmplacl 8 - -/* ---------------- - * initial contents of pg_pltemplate - * ---------------- - */ - - #endif /* PG_PLTEMPLATE_H */ diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index cd2f52c..f05eb32 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -2,7 +2,6 @@ * * pg_proc.h * definition of the system "procedure" relation (pg_proc) - * along with the relation's initial contents. * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California @@ -10,13 +9,8 @@ * src/include/catalog/pg_proc.h * * NOTES - * The script catalog/genbki.pl reads this file and generates .bki - * information from the DATA() statements. utils/Gen_fmgrtab.pl - * generates fmgroids.h and fmgrtab.c the same way. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... - * XXX (eg. #if 0 #endif won't do what you think) + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -115,552 +109,6 @@ typedef FormData_pg_proc *Form_pg_proc; #define Anum_pg_proc_proconfig 27 #define Anum_pg_proc_proacl 28 -/* ---------------- - * initial contents of pg_proc - * ---------------- - */ - -/* - * Note: every entry in pg_proc.h is expected to have a DESCR() comment, - * except for functions that implement pg_operator.h operators and don't - * have a good reason to be called directly rather than via the operator. - * (If you do expect such a function to be used directly, you should - * duplicate the operator's comment.) initdb will supply suitable default - * comments for functions referenced by pg_operator. - * - * Try to follow the style of existing functions' comments. - * Some recommended conventions: - * "I/O" for typinput, typoutput, typreceive, typsend functions - * "I/O typmod" for typmodin, typmodout functions - * "aggregate transition function" for aggtransfn functions, unless - * they are reasonably useful in their own right - * "aggregate final function" for aggfinalfn functions (likewise) - * "convert srctypename to desttypename" for cast functions - * "less-equal-greater" for B-tree comparison functions - */ - -/* keep the following ordered by OID so that later changes can be made easier */ - -/* OIDS 1 - 99 */ - - - - - -/* OIDS 100 - 199 */ - - - - - - - -/* OIDS 200 - 299 */ - - - - - - - - - - - - -/* OIDS 300 - 399 */ - - - -/* Index access method handlers */ - - - - - - -/* OIDS 400 - 499 */ - - - - - - - - -/* OIDS 500 - 599 */ - -/* OIDS 600 - 699 */ - - - - - - - - -/* OIDS 700 - 799 */ - - - - - - - - - - -/* OIDS 800 - 899 */ - - - - - - - - - -/* OIDS 900 - 999 */ - - - - - - - - - -/* OIDS 1000 - 1999 */ - - - -/* OIDS 1100 - 1199 */ - - - - - - -/* OIDS 1200 - 1299 */ - - - - - - - - - - - - - - -/* OIDS 1300 - 1399 */ - - - - - - - - - -/* - * This form of obj_description is now deprecated, since it will fail if - * OIDs are not unique across system catalogs. Use the other form instead. - */ - - - - - - - - - - - - - -/* OIDS 1400 - 1499 */ - - - - - - - - -/* pclose and popen might better be named close and open, but that crashes initdb. - * - thomas 97/04/20 - */ - - - - - - - -/* OIDS 1500 - 1599 */ - - - - - - - -/* SEQUENCE functions */ - - - - -/* OIDS 1600 - 1699 */ - - - - - - - - - - - -/* Oracle Compatibility Related Functions - By Edmund Mergl */ - - -/* for character set encoding support */ - -/* return database encoding name */ - -/* return client encoding name i.e. session encoding */ - - - - - - - - - -/* System-view support functions */ - - - - - - -/* Deferrable unique constraint trigger */ - -/* Generic referential integrity constraint triggers */ - - -/* avoid the C names bitand and bitor, since they are C++ keywords */ - - - - -/* for macaddr type support */ - - - -/* for macaddr8 type support */ - - - -/* for inet type support */ - -/* for cidr type support */ - -/* these are used for both inet and cidr */ - -/* inet/cidr functions */ - - - -/* GiST support for inet and cidr */ - -/* SP-GiST support for inet and cidr */ - -/* Selectivity estimation for inet and cidr */ - - - - - -/* OID's 1700 - 1799 NUMERIC data type */ - - - -/* formatting */ - - - - - -/* Selectivity estimators for LIKE and related operators */ - -/* Aggregate-related functions */ - - - -/* To ASCII conversion */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/* Aggregates (moved here from pg_aggregate for 7.3) */ - - - - - -/* count has two forms: count(any) and count(*) */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/* tablesample method handlers */ - -/* cryptographic */ - -/* crosstype operations for date vs. timestamp and timestamptz */ - - - - -/* crosstype operations for timestamp vs. timestamptz */ - - - -/* send/receive functions */ - - -/* System-view support functions with pretty-print option */ - -/* asynchronous notifications */ - -/* non-persistent series generator */ - -/* boolean aggregates */ -/* ANY, SOME? These names conflict with subquery operators. See doc. */ - -/* bitwise integer aggregates */ - -/* formerly-missing interval + datetime operators */ - - - -/* start time function */ -/* config reload time function */ - -/* new functions for Y-direction rtree opclasses */ - -/* support functions for GiST r-tree emulation */ - -/* GIN array support */ - -/* overlap/contains/contained */ - -/* BRIN minmax */ - -/* BRIN inclusion */ - -/* userlock replacements */ - -/* XML support */ - - - - - - - -/* json */ - - -/* uuid */ - -/* pg_lsn */ - -/* enum related procs */ - -/* text search stuff */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/* jsonb */ - - -/* txid */ - -/* record comparison using normal comparison rules */ - -/* record comparison using raw byte images */ - -/* Extensions */ - -/* SQL-spec window functions */ - -/* functions for range types */ - - - -/* date, time, timestamp constructors */ - -/* spgist opclasses */ - - - - - - -/* replication slots */ - -/* event triggers */ - -/* generic transition functions for ordered-set aggregates */ - -/* inverse distribution aggregates (and their support functions) */ - -/* hypothetical-set aggregates (and their support functions) */ - -/* pg_upgrade support */ - -/* replication/origin.h */ - - - - - - - - - - - - -/* publications */ - -/* rls */ - -/* pg_config */ - -/* pg_controldata related functions */ - - - - -/* collation management functions */ - - -/* system management/monitoring related functions */ - -/* hash partitioning constraint function */ - /* * Symbolic values for prokind column */ diff --git a/src/include/catalog/pg_publication.h b/src/include/catalog/pg_publication.h index 37e77b8..62772b6 100644 --- a/src/include/catalog/pg_publication.h +++ b/src/include/catalog/pg_publication.h @@ -9,8 +9,8 @@ * src/include/catalog/pg_publication.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_publication_rel.h b/src/include/catalog/pg_publication_rel.h index 033b600..661466f 100644 --- a/src/include/catalog/pg_publication_rel.h +++ b/src/include/catalog/pg_publication_rel.h @@ -9,8 +9,8 @@ * src/include/catalog/pg_publication_rel.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_range.h b/src/include/catalog/pg_range.h index bbd28f2..b7113bf 100644 --- a/src/include/catalog/pg_range.h +++ b/src/include/catalog/pg_range.h @@ -2,7 +2,6 @@ * * pg_range.h * definition of the system "range" relation (pg_range) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,11 +10,8 @@ * src/include/catalog/pg_range.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -60,13 +56,6 @@ typedef FormData_pg_range *Form_pg_range; #define Anum_pg_range_rngcanonical 5 #define Anum_pg_range_rngsubdiff 6 - -/* ---------------- - * initial contents of pg_range - * ---------------- - */ - - /* * prototypes for functions in pg_range.c */ diff --git a/src/include/catalog/pg_replication_origin.h b/src/include/catalog/pg_replication_origin.h index 9656179..0c5a05e 100644 --- a/src/include/catalog/pg_replication_origin.h +++ b/src/include/catalog/pg_replication_origin.h @@ -9,8 +9,8 @@ * src/include/catalog/pg_replication_origin.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -62,9 +62,4 @@ typedef FormData_pg_replication_origin *Form_pg_replication_origin; #define Anum_pg_replication_origin_roident 1 #define Anum_pg_replication_origin_roname 2 -/* ---------------- - * pg_replication_origin has no initial contents - * ---------------- - */ - #endif /* PG_REPLICATION_ORIGIN_H */ diff --git a/src/include/catalog/pg_rewrite.h b/src/include/catalog/pg_rewrite.h index 81f2b19..a310ecb 100644 --- a/src/include/catalog/pg_rewrite.h +++ b/src/include/catalog/pg_rewrite.h @@ -2,7 +2,6 @@ * * pg_rewrite.h * definition of the system "rewrite-rule" relation (pg_rewrite) - * along with the relation's initial contents. * * As of Postgres 7.3, the primary key for this table is * --- ie, rule names are only unique among the rules of a given table. @@ -14,8 +13,8 @@ * src/include/catalog/pg_rewrite.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_shdepend.h b/src/include/catalog/pg_shdepend.h index ae40377..17ac34a 100644 --- a/src/include/catalog/pg_shdepend.h +++ b/src/include/catalog/pg_shdepend.h @@ -2,8 +2,16 @@ * * pg_shdepend.h * definition of the system "shared dependency" relation (pg_shdepend) - * along with the relation's initial contents. * + * pg_shdepend has no preloaded contents, so there is no pg_shdepend.dat + * file; system-defined dependencies are loaded into it during a late stage + * of the initdb process. + * + * NOTE: we do not represent all possible dependency pairs in pg_shdepend; + * for example, there's not much value in creating an explicit dependency + * from a relation to its database. Currently, only dependencies on roles + * are explicitly stored in pg_shdepend. + * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California @@ -11,8 +19,8 @@ * src/include/catalog/pg_shdepend.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -77,14 +85,4 @@ typedef FormData_pg_shdepend *Form_pg_shdepend; #define Anum_pg_shdepend_deptype 7 -/* - * pg_shdepend has no preloaded contents; system-defined dependencies are - * loaded into it during a late stage of the initdb process. - * - * NOTE: we do not represent all possible dependency pairs in pg_shdepend; - * for example, there's not much value in creating an explicit dependency - * from a relation to its database. Currently, only dependencies on roles - * are explicitly stored in pg_shdepend. - */ - #endif /* PG_SHDEPEND_H */ diff --git a/src/include/catalog/pg_shdescription.h b/src/include/catalog/pg_shdescription.h index d4ec616..c0ecc0c 100644 --- a/src/include/catalog/pg_shdescription.h +++ b/src/include/catalog/pg_shdescription.h @@ -4,6 +4,10 @@ * definition of the system "shared description" relation * (pg_shdescription) * + * Because the contents of this table are taken from the *.dat files + * of other catalogs, there is no pg_shdescription.dat file. The initial + * contents are assembled by genbki.pl and loaded during initdb. + * * NOTE: an object is identified by the OID of the row that primarily * defines the object, plus the OID of the table that that row appears in. * For example, a database is identified by the OID of its pg_database row @@ -18,11 +22,8 @@ * src/include/catalog/pg_shdescription.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -64,15 +65,4 @@ typedef FormData_pg_shdescription * Form_pg_shdescription; #define Anum_pg_shdescription_classoid 2 #define Anum_pg_shdescription_description 3 -/* ---------------- - * initial contents of pg_shdescription - * ---------------- - */ - -/* - * Because the contents of this table are taken from the other *.h files, - * there is no initialization here. The initial contents are extracted - * by genbki.pl and loaded during initdb. - */ - #endif /* PG_SHDESCRIPTION_H */ diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h index a5c85fe..8ef2e55 100644 --- a/src/include/catalog/pg_statistic.h +++ b/src/include/catalog/pg_statistic.h @@ -2,7 +2,6 @@ * * pg_statistic.h * definition of the system "statistic" relation (pg_statistic) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_statistic.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_statistic_ext.h b/src/include/catalog/pg_statistic_ext.h index 2f5ef78c..d656cd8 100644 --- a/src/include/catalog/pg_statistic_ext.h +++ b/src/include/catalog/pg_statistic_ext.h @@ -2,7 +2,6 @@ * * pg_statistic_ext.h * definition of the system "extended statistic" relation (pg_statistic_ext) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_statistic_ext.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_tablespace.h b/src/include/catalog/pg_tablespace.h index 6db2ee2..75a3a2e 100644 --- a/src/include/catalog/pg_tablespace.h +++ b/src/include/catalog/pg_tablespace.h @@ -2,7 +2,6 @@ * * pg_tablespace.h * definition of the system "tablespace" relation (pg_tablespace) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_tablespace.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_transform.h b/src/include/catalog/pg_transform.h index d4fc464..21109db 100644 --- a/src/include/catalog/pg_transform.h +++ b/src/include/catalog/pg_transform.h @@ -7,8 +7,8 @@ * src/include/catalog/pg_transform.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h index c80a3aa..e307039 100644 --- a/src/include/catalog/pg_trigger.h +++ b/src/include/catalog/pg_trigger.h @@ -2,7 +2,6 @@ * * pg_trigger.h * definition of the system "trigger" relation (pg_trigger) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_trigger.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/pg_ts_config.h b/src/include/catalog/pg_ts_config.h index 7667585..21e6c2c 100644 --- a/src/include/catalog/pg_ts_config.h +++ b/src/include/catalog/pg_ts_config.h @@ -10,11 +10,8 @@ * src/include/catalog/pg_ts_config.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -50,9 +47,4 @@ typedef FormData_pg_ts_config *Form_pg_ts_config; #define Anum_pg_ts_config_cfgowner 3 #define Anum_pg_ts_config_cfgparser 4 -/* ---------------- - * initial contents of pg_ts_config - * ---------------- - */ - #endif /* PG_TS_CONFIG_H */ diff --git a/src/include/catalog/pg_ts_config_map.h b/src/include/catalog/pg_ts_config_map.h index 5d4820f..3b5e791 100644 --- a/src/include/catalog/pg_ts_config_map.h +++ b/src/include/catalog/pg_ts_config_map.h @@ -10,11 +10,8 @@ * src/include/catalog/pg_ts_config_map.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -50,10 +47,4 @@ typedef FormData_pg_ts_config_map *Form_pg_ts_config_map; #define Anum_pg_ts_config_map_mapseqno 3 #define Anum_pg_ts_config_map_mapdict 4 -/* ---------------- - * initial contents of pg_ts_config_map - * ---------------- - */ - - #endif /* PG_TS_CONFIG_MAP_H */ diff --git a/src/include/catalog/pg_ts_dict.h b/src/include/catalog/pg_ts_dict.h index 175cbb3..74c80f0 100644 --- a/src/include/catalog/pg_ts_dict.h +++ b/src/include/catalog/pg_ts_dict.h @@ -10,11 +10,8 @@ * src/include/catalog/pg_ts_dict.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -55,10 +52,4 @@ typedef FormData_pg_ts_dict *Form_pg_ts_dict; #define Anum_pg_ts_dict_dicttemplate 4 #define Anum_pg_ts_dict_dictinitoption 5 -/* ---------------- - * initial contents of pg_ts_dict - * ---------------- - */ - - #endif /* PG_TS_DICT_H */ diff --git a/src/include/catalog/pg_ts_parser.h b/src/include/catalog/pg_ts_parser.h index de1943d..5b5edd0 100644 --- a/src/include/catalog/pg_ts_parser.h +++ b/src/include/catalog/pg_ts_parser.h @@ -10,11 +10,8 @@ * src/include/catalog/pg_ts_parser.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -56,10 +53,4 @@ typedef FormData_pg_ts_parser *Form_pg_ts_parser; #define Anum_pg_ts_parser_prsheadline 6 #define Anum_pg_ts_parser_prslextype 7 -/* ---------------- - * initial contents of pg_ts_parser - * ---------------- - */ - - #endif /* PG_TS_PARSER_H */ diff --git a/src/include/catalog/pg_ts_template.h b/src/include/catalog/pg_ts_template.h index d33145a..b641788 100644 --- a/src/include/catalog/pg_ts_template.h +++ b/src/include/catalog/pg_ts_template.h @@ -10,11 +10,8 @@ * src/include/catalog/pg_ts_template.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. - * - * XXX do NOT break up DATA() statements into multiple lines! - * the scripts are not as smart as you might think... + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -50,10 +47,4 @@ typedef FormData_pg_ts_template *Form_pg_ts_template; #define Anum_pg_ts_template_tmplinit 3 #define Anum_pg_ts_template_tmpllexize 4 -/* ---------------- - * initial contents of pg_ts_template - * ---------------- - */ - - #endif /* PG_TS_TEMPLATE_H */ diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index 07bedd3..6aa9185 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -2,7 +2,6 @@ * * pg_type.h * definition of the system "type" relation (pg_type) - * along with the relation's initial contents. * * * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group @@ -11,8 +10,8 @@ * src/include/catalog/pg_type.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ @@ -268,106 +267,45 @@ typedef FormData_pg_type *Form_pg_type; #define Anum_pg_type_typdefault 29 #define Anum_pg_type_typacl 30 - -/* ---------------- - * initial contents of pg_type - * ---------------- - */ - -/* - * Keep the following ordered by OID so that later changes can be made more - * easily. - * - * For types used in the system catalogs, make sure the values here match - * TypInfo[] in bootstrap.c. - */ - -/* OIDS 1 - 99 */ #define BOOLOID 16 - #define BYTEAOID 17 - #define CHAROID 18 - #define NAMEOID 19 - #define INT8OID 20 - #define INT2OID 21 - #define INT2VECTOROID 22 - #define INT4OID 23 - #define REGPROCOID 24 - #define TEXTOID 25 - #define OIDOID 26 - #define TIDOID 27 - #define XIDOID 28 - #define CIDOID 29 - #define OIDVECTOROID 30 - -/* hand-built rowtype entries for bootstrapped catalogs */ -/* NB: OIDs assigned here must match the BKI_ROWTYPE_OID declarations */ - - -/* OIDS 100 - 199 */ #define JSONOID 114 #define XMLOID 142 - #define PGNODETREEOID 194 - #define PGNDISTINCTOID 3361 - #define PGDEPENDENCIESOID 3402 - #define PGDDLCOMMANDOID 32 - -/* OIDS 200 - 299 */ - - -/* OIDS 300 - 399 */ - -/* OIDS 400 - 499 */ - -/* OIDS 500 - 599 */ - -/* OIDS 600 - 699 */ #define POINTOID 600 #define LSEGOID 601 #define PATHOID 602 #define BOXOID 603 #define POLYGONOID 604 - #define LINEOID 628 - -/* OIDS 700 - 799 */ - #define FLOAT4OID 700 #define FLOAT8OID 701 #define ABSTIMEOID 702 #define RELTIMEOID 703 #define TINTERVALOID 704 #define UNKNOWNOID 705 - #define CIRCLEOID 718 #define CASHOID 790 - -/* OIDS 800 - 899 */ #define MACADDROID 829 #define INETOID 869 #define CIDROID 650 #define MACADDR8OID 774 - -/* OIDS 900 - 999 */ - -/* OIDS 1000 - 1099 */ #define INT2ARRAYOID 1005 #define INT4ARRAYOID 1007 #define TEXTARRAYOID 1009 @@ -375,84 +313,35 @@ typedef FormData_pg_type *Form_pg_type; #define FLOAT4ARRAYOID 1021 #define ACLITEMOID 1033 #define CSTRINGARRAYOID 1263 - #define BPCHAROID 1042 #define VARCHAROID 1043 - #define DATEOID 1082 #define TIMEOID 1083 - -/* OIDS 1100 - 1199 */ #define TIMESTAMPOID 1114 #define TIMESTAMPTZOID 1184 #define INTERVALOID 1186 - -/* OIDS 1200 - 1299 */ #define TIMETZOID 1266 - -/* OIDS 1500 - 1599 */ #define BITOID 1560 #define VARBITOID 1562 - -/* OIDS 1600 - 1699 */ - -/* OIDS 1700 - 1799 */ #define NUMERICOID 1700 - #define REFCURSOROID 1790 - -/* OIDS 2200 - 2299 */ - #define REGPROCEDUREOID 2202 - #define REGOPEROID 2203 - #define REGOPERATOROID 2204 - #define REGCLASSOID 2205 - #define REGTYPEOID 2206 - #define REGROLEOID 4096 - #define REGNAMESPACEOID 4089 - #define REGTYPEARRAYOID 2211 - -/* uuid */ #define UUIDOID 2950 - -/* pg_lsn */ #define LSNOID 3220 - -/* text search */ #define TSVECTOROID 3614 #define GTSVECTOROID 3642 #define TSQUERYOID 3615 #define REGCONFIGOID 3734 #define REGDICTIONARYOID 3769 - - -/* jsonb */ #define JSONBOID 3802 - - -/* range types */ #define INT4RANGEOID 3904 - -/* - * pseudo-types - * - * types with typtype='p' represent various special cases in the type system. - * - * These cannot be used to define table columns, but are valid as function - * argument and result types (if supported by the function's implementation - * language). - * - * Note: cstring is a borderline case; it is still considered a pseudo-type, - * but there is now support for it in records and arrays. Perhaps we should - * just treat it as a regular base type? - */ #define RECORDOID 2249 #define RECORDARRAYOID 2287 #define CSTRINGOID 2275 @@ -472,7 +361,6 @@ typedef FormData_pg_type *Form_pg_type; #define TSM_HANDLEROID 3310 #define ANYRANGEOID 3831 - /* * macros */ diff --git a/src/include/catalog/pg_user_mapping.h b/src/include/catalog/pg_user_mapping.h index 686562a..3da6496 100644 --- a/src/include/catalog/pg_user_mapping.h +++ b/src/include/catalog/pg_user_mapping.h @@ -9,8 +9,8 @@ * src/include/catalog/pg_user_mapping.h * * NOTES - * the genbki.pl script reads this file and generates .bki - * information from the DATA() statements. + * The Catalog.pm module reads this file and derives schema + * information. * *------------------------------------------------------------------------- */ diff --git a/src/include/catalog/toasting.h b/src/include/catalog/toasting.h index f6387ae..3db39b8 100644 --- a/src/include/catalog/toasting.h +++ b/src/include/catalog/toasting.h @@ -30,7 +30,7 @@ extern void BootstrapToastTable(char *relName, /* * This macro is just to keep the C compiler from spitting up on the - * upcoming commands for genbki.pl. + * upcoming commands for Catalog.pm. */ #define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable -- 2.7.4