From 7bb1ac7e0a5a1babe169092d18598a06ff3135b1 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Mon, 16 Apr 2018 18:45:27 +0700
Subject: [PATCH 2/2] Dispense with BKI_ prefix for CATALOG options

---
 src/backend/catalog/Catalog.pm              | 10 +++++-----
 src/backend/catalog/catalog.c               |  2 +-
 src/include/catalog/duplicate_oids          |  4 ++--
 src/include/catalog/genbki.h                | 14 +++++++-------
 src/include/catalog/pg_aggregate.h          |  2 +-
 src/include/catalog/pg_attribute.h          |  2 +-
 src/include/catalog/pg_auth_members.h       |  2 +-
 src/include/catalog/pg_authid.h             |  2 +-
 src/include/catalog/pg_class.h              |  2 +-
 src/include/catalog/pg_database.h           |  2 +-
 src/include/catalog/pg_db_role_setting.h    |  2 +-
 src/include/catalog/pg_depend.h             |  2 +-
 src/include/catalog/pg_description.h        |  2 +-
 src/include/catalog/pg_foreign_table.h      |  2 +-
 src/include/catalog/pg_index.h              |  2 +-
 src/include/catalog/pg_inherits.h           |  2 +-
 src/include/catalog/pg_init_privs.h         |  2 +-
 src/include/catalog/pg_largeobject.h        |  2 +-
 src/include/catalog/pg_partitioned_table.h  |  2 +-
 src/include/catalog/pg_pltemplate.h         |  2 +-
 src/include/catalog/pg_proc.h               |  2 +-
 src/include/catalog/pg_range.h              |  2 +-
 src/include/catalog/pg_replication_origin.h |  2 +-
 src/include/catalog/pg_seclabel.h           |  2 +-
 src/include/catalog/pg_sequence.h           |  2 +-
 src/include/catalog/pg_shdepend.h           |  2 +-
 src/include/catalog/pg_shdescription.h      |  2 +-
 src/include/catalog/pg_shseclabel.h         |  2 +-
 src/include/catalog/pg_statistic.h          |  2 +-
 src/include/catalog/pg_subscription.h       |  2 +-
 src/include/catalog/pg_subscription_rel.h   |  2 +-
 src/include/catalog/pg_tablespace.h         |  2 +-
 src/include/catalog/pg_ts_config_map.h      |  2 +-
 src/include/catalog/pg_type.h               |  2 +-
 src/include/catalog/unused_oids             |  6 +++---
 35 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm
index 5a0d46a..eca5ae6 100644
--- a/src/backend/catalog/Catalog.pm
+++ b/src/backend/catalog/Catalog.pm
@@ -111,12 +111,12 @@ sub ParseHeader
 				my $catalog_label = $3;
 				$catalog{relation_oid_macro} = $catalog_label . 'RelationId';
 
-				$catalog{bootstrap} = /BKI_BOOTSTRAP/ ? ' bootstrap' : '';
+				$catalog{bootstrap} = /BOOTSTRAP/ ? ' bootstrap' : '';
 				$catalog{shared_relation} =
-				  /BKI_SHARED_RELATION/ ? ' shared_relation' : '';
+				  /SHARED_RELATION/ ? ' shared_relation' : '';
 				$catalog{without_oids} =
-				  /BKI_WITHOUT_OIDS/ ? ' without_oids' : '';
-				if (/BKI_ROWTYPE_OID\((\d+)\)/)
+				  /WITHOUT_OIDS/ ? ' without_oids' : '';
+				if (/ROWTYPE_OID\((\d+)\)/)
 				{
 					$catalog{rowtype_oid} = $1;
 					$catalog{rowtype_oid_clause} = " rowtype_oid $1";
@@ -129,7 +129,7 @@ sub ParseHeader
 					$catalog{rowtype_oid_clause} = '';
 					$catalog{rowtype_oid_macro} = '';
 				}
-				$catalog{schema_macro} = /BKI_SCHEMA_MACRO/ ? 1 : 0;
+				$catalog{schema_macro} = /SCHEMA_MACRO/ ? 1 : 0;
 				$declaring_attributes = 1;
 			}
 			elsif ($is_client_code)
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 2292deb..b40e2c7 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -219,7 +219,7 @@ IsReservedName(const char *name)
 bool
 IsSharedRelation(Oid relationId)
 {
-	/* These are the shared catalogs (look for BKI_SHARED_RELATION) */
+	/* These are the shared catalogs (look for SHARED_RELATION) */
 	if (relationId == AuthIdRelationId ||
 		relationId == AuthMemRelationId ||
 		relationId == DatabaseRelationId ||
diff --git a/src/include/catalog/duplicate_oids b/src/include/catalog/duplicate_oids
index 61a72d3..33597b3 100755
--- a/src/include/catalog/duplicate_oids
+++ b/src/include/catalog/duplicate_oids
@@ -12,10 +12,10 @@ my %oidcounts;
 
 while (<>)
 {
-	next if /^CATALOG\(.*BKI_BOOTSTRAP/;
+	next if /^CATALOG\(.*BOOTSTRAP/;
 	next
 	  unless /\boid *=> *'(\d+)'/
-		  || /^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+)\)/
+		  || /^CATALOG\([^,]*, *(\d+).*ROWTYPE_OID\((\d+)\)/
 		  || /^CATALOG\([^,]*, *(\d+)/
 		  || /^DECLARE_INDEX\([^,]*, *(\d+)/
 		  || /^DECLARE_UNIQUE_INDEX\([^,]*, *(\d+)/
diff --git a/src/include/catalog/genbki.h b/src/include/catalog/genbki.h
index 576ca3b..75481c5 100644
--- a/src/include/catalog/genbki.h
+++ b/src/include/catalog/genbki.h
@@ -3,8 +3,8 @@
  * genbki.h
  *	  Required include file for all POSTGRES catalog header files
  *
- * genbki.h defines CATALOG(), BKI_BOOTSTRAP and related macros
- * so that the catalog header files can be read by the C compiler.
+ * genbki.h defines CATALOG(), 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.)
  *
@@ -23,11 +23,11 @@
 #define CATALOG(name,oid,label) typedef struct CppConcat(FormData_,name)
 
 /* Options that may appear after CATALOG (on the same line) */
-#define BKI_BOOTSTRAP
-#define BKI_SHARED_RELATION
-#define BKI_WITHOUT_OIDS
-#define BKI_ROWTYPE_OID(oid)
-#define BKI_SCHEMA_MACRO
+#define BOOTSTRAP
+#define SHARED_RELATION
+#define WITHOUT_OIDS
+#define ROWTYPE_OID(oid)
+#define SCHEMA_MACRO
 
 /* Options that may appear after an attribute (on the same line) */
 #define BKI_FORCE_NULL
diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h
index e14b3ba..1a94f99 100644
--- a/src/include/catalog/pg_aggregate.h
+++ b/src/include/catalog/pg_aggregate.h
@@ -29,7 +29,7 @@
  *		cpp turns this into typedef struct FormData_pg_aggregate
  * ----------------------------------------------------------------
  */
-CATALOG(pg_aggregate,2600,Aggregate) BKI_WITHOUT_OIDS
+CATALOG(pg_aggregate,2600,Aggregate) WITHOUT_OIDS
 {
 	/* pg_proc OID of the aggregate itself */
 	regproc		aggfnoid BKI_LOOKUP(pg_proc);
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index c9745e4..53481eb 100644
--- a/src/include/catalog/pg_attribute.h
+++ b/src/include/catalog/pg_attribute.h
@@ -34,7 +34,7 @@
  *		You may need to change catalog/genbki.pl as well.
  * ----------------
  */
-CATALOG(pg_attribute,1249,Attribute) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BKI_SCHEMA_MACRO
+CATALOG(pg_attribute,1249,Attribute) BOOTSTRAP WITHOUT_OIDS ROWTYPE_OID(75) SCHEMA_MACRO
 {
 	Oid			attrelid;		/* OID of relation containing this attribute */
 	NameData	attname;		/* name of attribute */
diff --git a/src/include/catalog/pg_auth_members.h b/src/include/catalog/pg_auth_members.h
index 4212f4b..eecf98d 100644
--- a/src/include/catalog/pg_auth_members.h
+++ b/src/include/catalog/pg_auth_members.h
@@ -27,7 +27,7 @@
  *		typedef struct FormData_pg_auth_members
  * ----------------
  */
-CATALOG(pg_auth_members,1261,AuthMem) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(2843) BKI_SCHEMA_MACRO
+CATALOG(pg_auth_members,1261,AuthMem) SHARED_RELATION WITHOUT_OIDS ROWTYPE_OID(2843) SCHEMA_MACRO
 {
 	Oid			roleid;			/* ID of a role */
 	Oid			member;			/* ID of a member of that role */
diff --git a/src/include/catalog/pg_authid.h b/src/include/catalog/pg_authid.h
index f647177..0166b16 100644
--- a/src/include/catalog/pg_authid.h
+++ b/src/include/catalog/pg_authid.h
@@ -28,7 +28,7 @@
  *		typedef struct FormData_pg_authid
  * ----------------
  */
-CATALOG(pg_authid,1260,AuthId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MACRO
+CATALOG(pg_authid,1260,AuthId) SHARED_RELATION ROWTYPE_OID(2842) SCHEMA_MACRO
 {
 	NameData	rolname;		/* name of role */
 	bool		rolsuper;		/* read this field via superuser() only! */
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index f194dae..cac96e5 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_class
  * ----------------
  */
-CATALOG(pg_class,1259,Relation) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
+CATALOG(pg_class,1259,Relation) BOOTSTRAP ROWTYPE_OID(83) SCHEMA_MACRO
 {
 	NameData	relname;		/* class name */
 	Oid			relnamespace;	/* OID of namespace containing this class */
diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h
index 24be0e7..380a5c5 100644
--- a/src/include/catalog/pg_database.h
+++ b/src/include/catalog/pg_database.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_database
  * ----------------
  */
-CATALOG(pg_database,1262,Database) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_MACRO
+CATALOG(pg_database,1262,Database) SHARED_RELATION ROWTYPE_OID(1248) SCHEMA_MACRO
 {
 	NameData	datname;		/* database name */
 	Oid			datdba;			/* owner of database */
diff --git a/src/include/catalog/pg_db_role_setting.h b/src/include/catalog/pg_db_role_setting.h
index e6d4e72..6096959 100644
--- a/src/include/catalog/pg_db_role_setting.h
+++ b/src/include/catalog/pg_db_role_setting.h
@@ -30,7 +30,7 @@
  *		typedef struct FormData_pg_db_role_setting
  * ----------------
  */
-CATALOG(pg_db_role_setting,2964,DbRoleSetting) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_db_role_setting,2964,DbRoleSetting) SHARED_RELATION WITHOUT_OIDS
 {
 	Oid			setdatabase;	/* database */
 	Oid			setrole;		/* role */
diff --git a/src/include/catalog/pg_depend.h b/src/include/catalog/pg_depend.h
index 1043ab9..ebdb08b 100644
--- a/src/include/catalog/pg_depend.h
+++ b/src/include/catalog/pg_depend.h
@@ -38,7 +38,7 @@
  *		typedef struct FormData_pg_depend
  * ----------------
  */
-CATALOG(pg_depend,2608,Depend) BKI_WITHOUT_OIDS
+CATALOG(pg_depend,2608,Depend) WITHOUT_OIDS
 {
 	/*
 	 * Identification of the dependent (referencing) object.
diff --git a/src/include/catalog/pg_description.h b/src/include/catalog/pg_description.h
index 157b324..5c47979 100644
--- a/src/include/catalog/pg_description.h
+++ b/src/include/catalog/pg_description.h
@@ -45,7 +45,7 @@
  *		typedef struct FormData_pg_description
  * ----------------
  */
-CATALOG(pg_description,2609,Description) BKI_WITHOUT_OIDS
+CATALOG(pg_description,2609,Description) WITHOUT_OIDS
 {
 	Oid			objoid;			/* OID of object itself */
 	Oid			classoid;		/* OID of table containing object */
diff --git a/src/include/catalog/pg_foreign_table.h b/src/include/catalog/pg_foreign_table.h
index c264c24..a8b4c2b 100644
--- a/src/include/catalog/pg_foreign_table.h
+++ b/src/include/catalog/pg_foreign_table.h
@@ -25,7 +25,7 @@
  *		typedef struct FormData_pg_foreign_table
  * ----------------
  */
-CATALOG(pg_foreign_table,3118,ForeignTable) BKI_WITHOUT_OIDS
+CATALOG(pg_foreign_table,3118,ForeignTable) WITHOUT_OIDS
 {
 	Oid			ftrelid;		/* OID of foreign table */
 	Oid			ftserver;		/* OID of foreign server */
diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h
index dd3b4d4..1d2745a 100644
--- a/src/include/catalog/pg_index.h
+++ b/src/include/catalog/pg_index.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_index.
  * ----------------
  */
-CATALOG(pg_index,2610,Index) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
+CATALOG(pg_index,2610,Index) WITHOUT_OIDS SCHEMA_MACRO
 {
 	Oid			indexrelid;		/* OID of the index */
 	Oid			indrelid;		/* OID of the relation it indexes */
diff --git a/src/include/catalog/pg_inherits.h b/src/include/catalog/pg_inherits.h
index a167492..c5c9985 100644
--- a/src/include/catalog/pg_inherits.h
+++ b/src/include/catalog/pg_inherits.h
@@ -29,7 +29,7 @@
  *		typedef struct FormData_pg_inherits
  * ----------------
  */
-CATALOG(pg_inherits,2611,Inherits) BKI_WITHOUT_OIDS
+CATALOG(pg_inherits,2611,Inherits) WITHOUT_OIDS
 {
 	Oid			inhrelid;
 	Oid			inhparent;
diff --git a/src/include/catalog/pg_init_privs.h b/src/include/catalog/pg_init_privs.h
index f5f2c56..3b89efa 100644
--- a/src/include/catalog/pg_init_privs.h
+++ b/src/include/catalog/pg_init_privs.h
@@ -43,7 +43,7 @@
  *		typedef struct FormData_pg_init_privs
  * ----------------
  */
-CATALOG(pg_init_privs,3394,InitPrivs) BKI_WITHOUT_OIDS
+CATALOG(pg_init_privs,3394,InitPrivs) WITHOUT_OIDS
 {
 	Oid			objoid;			/* OID of object itself */
 	Oid			classoid;		/* OID of table containing object */
diff --git a/src/include/catalog/pg_largeobject.h b/src/include/catalog/pg_largeobject.h
index ce8a70c..3fd7daa 100644
--- a/src/include/catalog/pg_largeobject.h
+++ b/src/include/catalog/pg_largeobject.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_largeobject
  * ----------------
  */
-CATALOG(pg_largeobject,2613,LargeObject) BKI_WITHOUT_OIDS
+CATALOG(pg_largeobject,2613,LargeObject) WITHOUT_OIDS
 {
 	Oid			loid;			/* Identifier of large object */
 	int32		pageno;			/* Page number (starting from 0) */
diff --git a/src/include/catalog/pg_partitioned_table.h b/src/include/catalog/pg_partitioned_table.h
index bcec129..a25e949 100644
--- a/src/include/catalog/pg_partitioned_table.h
+++ b/src/include/catalog/pg_partitioned_table.h
@@ -25,7 +25,7 @@
  *		typedef struct FormData_pg_partitioned_table
  * ----------------
  */
-CATALOG(pg_partitioned_table,3350,Partitioned) BKI_WITHOUT_OIDS
+CATALOG(pg_partitioned_table,3350,Partitioned) WITHOUT_OIDS
 {
 	Oid			partrelid;		/* partitioned table oid */
 	char		partstrat;		/* partitioning strategy */
diff --git a/src/include/catalog/pg_pltemplate.h b/src/include/catalog/pg_pltemplate.h
index 55f7b56..d93c520 100644
--- a/src/include/catalog/pg_pltemplate.h
+++ b/src/include/catalog/pg_pltemplate.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_pltemplate
  * ----------------
  */
-CATALOG(pg_pltemplate,1136,PLTemplate) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_pltemplate,1136,PLTemplate) SHARED_RELATION WITHOUT_OIDS
 {
 	NameData	tmplname;		/* name of PL */
 	bool		tmpltrusted;	/* PL is trusted? */
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 94dca57..df738a0 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -28,7 +28,7 @@
  *		typedef struct FormData_pg_proc
  * ----------------
  */
-CATALOG(pg_proc,1255,Procedure) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81) BKI_SCHEMA_MACRO
+CATALOG(pg_proc,1255,Procedure) BOOTSTRAP ROWTYPE_OID(81) SCHEMA_MACRO
 {
 	/* procedure name */
 	NameData	proname;
diff --git a/src/include/catalog/pg_range.h b/src/include/catalog/pg_range.h
index 3681b78..ff59a0f 100644
--- a/src/include/catalog/pg_range.h
+++ b/src/include/catalog/pg_range.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_range
  * ----------------
  */
-CATALOG(pg_range,3541,Range) BKI_WITHOUT_OIDS
+CATALOG(pg_range,3541,Range) WITHOUT_OIDS
 {
 	/* OID of owning range type */
 	Oid			rngtypid BKI_LOOKUP(pg_type);
diff --git a/src/include/catalog/pg_replication_origin.h b/src/include/catalog/pg_replication_origin.h
index 02621a6..7324938 100644
--- a/src/include/catalog/pg_replication_origin.h
+++ b/src/include/catalog/pg_replication_origin.h
@@ -27,7 +27,7 @@
  *		typedef struct FormData_pg_replication_origin
  * ----------------
  */
-CATALOG(pg_replication_origin,6000,ReplicationOrigin) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_replication_origin,6000,ReplicationOrigin) SHARED_RELATION WITHOUT_OIDS
 {
 	/*
 	 * Locally known id that get included into WAL.
diff --git a/src/include/catalog/pg_seclabel.h b/src/include/catalog/pg_seclabel.h
index a3a35f4..fd81568 100644
--- a/src/include/catalog/pg_seclabel.h
+++ b/src/include/catalog/pg_seclabel.h
@@ -19,7 +19,7 @@
  *		typedef struct FormData_pg_seclabel
  * ----------------
  */
-CATALOG(pg_seclabel,3596,SecLabel) BKI_WITHOUT_OIDS
+CATALOG(pg_seclabel,3596,SecLabel) WITHOUT_OIDS
 {
 	Oid			objoid;			/* OID of the object itself */
 	Oid			classoid;		/* OID of table containing the object */
diff --git a/src/include/catalog/pg_sequence.h b/src/include/catalog/pg_sequence.h
index 4632160..45d26b4 100644
--- a/src/include/catalog/pg_sequence.h
+++ b/src/include/catalog/pg_sequence.h
@@ -14,7 +14,7 @@
 #include "catalog/genbki.h"
 #include "catalog/pg_sequence_d.h"
 
-CATALOG(pg_sequence,2224,Sequence) BKI_WITHOUT_OIDS
+CATALOG(pg_sequence,2224,Sequence) WITHOUT_OIDS
 {
 	Oid			seqrelid;
 	Oid			seqtypid;
diff --git a/src/include/catalog/pg_shdepend.h b/src/include/catalog/pg_shdepend.h
index a01d5fa..27a52d1 100644
--- a/src/include/catalog/pg_shdepend.h
+++ b/src/include/catalog/pg_shdepend.h
@@ -34,7 +34,7 @@
  *		typedef struct FormData_pg_shdepend
  * ----------------
  */
-CATALOG(pg_shdepend,1214,SharedDepend) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_shdepend,1214,SharedDepend) SHARED_RELATION WITHOUT_OIDS
 {
 	/*
 	 * Identification of the dependent (referencing) object.
diff --git a/src/include/catalog/pg_shdescription.h b/src/include/catalog/pg_shdescription.h
index 07ff550..b737af0 100644
--- a/src/include/catalog/pg_shdescription.h
+++ b/src/include/catalog/pg_shdescription.h
@@ -38,7 +38,7 @@
  *		typedef struct FormData_pg_shdescription
  * ----------------
  */
-CATALOG(pg_shdescription,2396,SharedDescription) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_shdescription,2396,SharedDescription) SHARED_RELATION WITHOUT_OIDS
 {
 	Oid			objoid;			/* OID of object itself */
 	Oid			classoid;		/* OID of table containing object */
diff --git a/src/include/catalog/pg_shseclabel.h b/src/include/catalog/pg_shseclabel.h
index 91ff667..3cf2738 100644
--- a/src/include/catalog/pg_shseclabel.h
+++ b/src/include/catalog/pg_shseclabel.h
@@ -19,7 +19,7 @@
  *		typedef struct FormData_pg_shseclabel
  * ----------------
  */
-CATALOG(pg_shseclabel,3592,SharedSecLabel) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
+CATALOG(pg_shseclabel,3592,SharedSecLabel) SHARED_RELATION ROWTYPE_OID(4066) WITHOUT_OIDS SCHEMA_MACRO
 {
 	Oid			objoid;			/* OID of the shared object itself */
 	Oid			classoid;		/* OID of table containing the shared object */
diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h
index a08f776..3a22975 100644
--- a/src/include/catalog/pg_statistic.h
+++ b/src/include/catalog/pg_statistic.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_statistic
  * ----------------
  */
-CATALOG(pg_statistic,2619,Statistic) BKI_WITHOUT_OIDS
+CATALOG(pg_statistic,2619,Statistic) WITHOUT_OIDS
 {
 	/* These fields form the unique key for the entry: */
 	Oid			starelid;		/* relation containing attribute */
diff --git a/src/include/catalog/pg_subscription.h b/src/include/catalog/pg_subscription.h
index 3c9b287..7e95e5d 100644
--- a/src/include/catalog/pg_subscription.h
+++ b/src/include/catalog/pg_subscription.h
@@ -30,7 +30,7 @@
  *
  * NOTE:  When adding a column, also update system_views.sql.
  */
-CATALOG(pg_subscription,6100,Subscription) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHEMA_MACRO
+CATALOG(pg_subscription,6100,Subscription) SHARED_RELATION ROWTYPE_OID(6101) SCHEMA_MACRO
 {
 	Oid			subdbid;		/* Database the subscription is in. */
 	NameData	subname;		/* Name of the subscription */
diff --git a/src/include/catalog/pg_subscription_rel.h b/src/include/catalog/pg_subscription_rel.h
index dbfd592..ede46cd 100644
--- a/src/include/catalog/pg_subscription_rel.h
+++ b/src/include/catalog/pg_subscription_rel.h
@@ -23,7 +23,7 @@
  *		typedef struct FormData_pg_subscription_rel
  * ----------------
  */
-CATALOG(pg_subscription_rel,6102,SubscriptionRel) BKI_WITHOUT_OIDS
+CATALOG(pg_subscription_rel,6102,SubscriptionRel) WITHOUT_OIDS
 {
 	Oid			srsubid;		/* Oid of subscription */
 	Oid			srrelid;		/* Oid of relation */
diff --git a/src/include/catalog/pg_tablespace.h b/src/include/catalog/pg_tablespace.h
index 1d6668e..ef10ff7 100644
--- a/src/include/catalog/pg_tablespace.h
+++ b/src/include/catalog/pg_tablespace.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_tablespace
  * ----------------
  */
-CATALOG(pg_tablespace,1213,TableSpace) BKI_SHARED_RELATION
+CATALOG(pg_tablespace,1213,TableSpace) SHARED_RELATION
 {
 	NameData	spcname;		/* tablespace name */
 	Oid			spcowner;		/* owner of tablespace */
diff --git a/src/include/catalog/pg_ts_config_map.h b/src/include/catalog/pg_ts_config_map.h
index aea4f31..08a114b 100644
--- a/src/include/catalog/pg_ts_config_map.h
+++ b/src/include/catalog/pg_ts_config_map.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_ts_config_map
  * ----------------
  */
-CATALOG(pg_ts_config_map,3603,TSConfigMap) BKI_WITHOUT_OIDS
+CATALOG(pg_ts_config_map,3603,TSConfigMap) WITHOUT_OIDS
 {
 	Oid			mapcfg;			/* OID of configuration owning this entry */
 	int32		maptokentype;	/* token type from parser */
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index efe9206..21a6b66 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -34,7 +34,7 @@
  *		See struct FormData_pg_attribute for details.
  * ----------------
  */
-CATALOG(pg_type,1247,Type) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
+CATALOG(pg_type,1247,Type) BOOTSTRAP ROWTYPE_OID(71) SCHEMA_MACRO
 {
 	/* type name */
 	NameData	typname;
diff --git a/src/include/catalog/unused_oids b/src/include/catalog/unused_oids
index e8be34c..3674631 100755
--- a/src/include/catalog/unused_oids
+++ b/src/include/catalog/unused_oids
@@ -24,13 +24,13 @@ FIRSTOBJECTID=`grep '#define[ 	]*FirstBootstrapObjectId' ../access/transam.h | $
 export FIRSTOBJECTID
 
 # this part (down to the uniq step) should match the duplicate_oids script
-# note: we exclude BKI_BOOTSTRAP relations since they are expected to have
+# note: we exclude BOOTSTRAP relations since they are expected to have
 # matching data entries in pg_class.dat and pg_type.dat
 
 cat pg_*.h pg_*.dat toasting.h indexing.h |
-egrep -v -e '^CATALOG\(.*BKI_BOOTSTRAP' | \
+egrep -v -e '^CATALOG\(.*BOOTSTRAP' | \
 sed -n	-e 's/.*\boid *=> *'\''\([0-9][0-9]*\)'\''.*$/\1/p' \
-	-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*BKI_ROWTYPE_OID(\([0-9][0-9]*\)).*$/\1,\2/p' \
+	-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*ROWTYPE_OID(\([0-9][0-9]*\)).*$/\1,\2/p' \
 	-e 's/^CATALOG([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
 	-e 's/^DECLARE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
 	-e 's/^DECLARE_UNIQUE_INDEX([^,]*, *\([0-9][0-9]*\).*$/\1/p' \
-- 
2.7.4

