From ff1384643e47ef423ab13cfd847f12c0969029f1 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Mon, 16 Apr 2018 17:42:28 +0700
Subject: [PATCH 1/2] Shorten notation for relation and rowtype OID macros

---
 src/backend/catalog/Catalog.pm                | 8 +++++---
 src/include/catalog/duplicate_oids            | 2 +-
 src/include/catalog/genbki.h                  | 4 ++--
 src/include/catalog/pg_aggregate.h            | 2 +-
 src/include/catalog/pg_am.h                   | 2 +-
 src/include/catalog/pg_amop.h                 | 2 +-
 src/include/catalog/pg_amproc.h               | 2 +-
 src/include/catalog/pg_attrdef.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_cast.h                 | 2 +-
 src/include/catalog/pg_class.h                | 2 +-
 src/include/catalog/pg_collation.h            | 2 +-
 src/include/catalog/pg_constraint.h           | 2 +-
 src/include/catalog/pg_conversion.h           | 2 +-
 src/include/catalog/pg_database.h             | 2 +-
 src/include/catalog/pg_db_role_setting.h      | 2 +-
 src/include/catalog/pg_default_acl.h          | 2 +-
 src/include/catalog/pg_depend.h               | 2 +-
 src/include/catalog/pg_description.h          | 2 +-
 src/include/catalog/pg_enum.h                 | 2 +-
 src/include/catalog/pg_event_trigger.h        | 2 +-
 src/include/catalog/pg_extension.h            | 2 +-
 src/include/catalog/pg_foreign_data_wrapper.h | 2 +-
 src/include/catalog/pg_foreign_server.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_language.h             | 2 +-
 src/include/catalog/pg_largeobject.h          | 2 +-
 src/include/catalog/pg_largeobject_metadata.h | 2 +-
 src/include/catalog/pg_namespace.h            | 2 +-
 src/include/catalog/pg_opclass.h              | 2 +-
 src/include/catalog/pg_operator.h             | 2 +-
 src/include/catalog/pg_opfamily.h             | 2 +-
 src/include/catalog/pg_partitioned_table.h    | 2 +-
 src/include/catalog/pg_pltemplate.h           | 2 +-
 src/include/catalog/pg_policy.h               | 2 +-
 src/include/catalog/pg_proc.h                 | 2 +-
 src/include/catalog/pg_publication.h          | 2 +-
 src/include/catalog/pg_publication_rel.h      | 2 +-
 src/include/catalog/pg_range.h                | 2 +-
 src/include/catalog/pg_replication_origin.h   | 2 +-
 src/include/catalog/pg_rewrite.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_statistic_ext.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_transform.h            | 2 +-
 src/include/catalog/pg_trigger.h              | 2 +-
 src/include/catalog/pg_ts_config.h            | 2 +-
 src/include/catalog/pg_ts_config_map.h        | 2 +-
 src/include/catalog/pg_ts_dict.h              | 2 +-
 src/include/catalog/pg_ts_parser.h            | 2 +-
 src/include/catalog/pg_ts_template.h          | 2 +-
 src/include/catalog/pg_type.h                 | 2 +-
 src/include/catalog/pg_user_mapping.h         | 2 +-
 src/include/catalog/unused_oids               | 2 +-
 66 files changed, 71 insertions(+), 69 deletions(-)

diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm
index c32ce2f..5a0d46a 100644
--- a/src/backend/catalog/Catalog.pm
+++ b/src/backend/catalog/Catalog.pm
@@ -108,18 +108,20 @@ sub ParseHeader
 			{
 				$catalog{catname} = $1;
 				$catalog{relation_oid} = $2;
-				$catalog{relation_oid_macro} = $3;
+				my $catalog_label = $3;
+				$catalog{relation_oid_macro} = $catalog_label . 'RelationId';
 
 				$catalog{bootstrap} = /BKI_BOOTSTRAP/ ? ' bootstrap' : '';
 				$catalog{shared_relation} =
 				  /BKI_SHARED_RELATION/ ? ' shared_relation' : '';
 				$catalog{without_oids} =
 				  /BKI_WITHOUT_OIDS/ ? ' without_oids' : '';
-				if (/BKI_ROWTYPE_OID\((\d+),(\w+)\)/)
+				if (/BKI_ROWTYPE_OID\((\d+)\)/)
 				{
 					$catalog{rowtype_oid} = $1;
 					$catalog{rowtype_oid_clause} = " rowtype_oid $1";
-					$catalog{rowtype_oid_macro} = $2;
+					$catalog{rowtype_oid_macro} =
+					  $catalog_label . 'Relation_Rowtype_Id';
 				}
 				else
 				{
diff --git a/src/include/catalog/duplicate_oids b/src/include/catalog/duplicate_oids
index 8c143cf..61a72d3 100755
--- a/src/include/catalog/duplicate_oids
+++ b/src/include/catalog/duplicate_oids
@@ -15,7 +15,7 @@ while (<>)
 	next if /^CATALOG\(.*BKI_BOOTSTRAP/;
 	next
 	  unless /\boid *=> *'(\d+)'/
-		  || /^CATALOG\([^,]*, *(\d+).*BKI_ROWTYPE_OID\((\d+),/
+		  || /^CATALOG\([^,]*, *(\d+).*BKI_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 b1e2cbd..576ca3b 100644
--- a/src/include/catalog/genbki.h
+++ b/src/include/catalog/genbki.h
@@ -20,13 +20,13 @@
 #define GENBKI_H
 
 /* Introduces a catalog's structure definition */
-#define CATALOG(name,oid,oidmacro)	typedef struct CppConcat(FormData_,name)
+#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,oidmacro)
+#define BKI_ROWTYPE_OID(oid)
 #define BKI_SCHEMA_MACRO
 
 /* Options that may appear after an attribute (on the same line) */
diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h
index 8eb5f63..e14b3ba 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,AggregateRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_aggregate,2600,Aggregate) BKI_WITHOUT_OIDS
 {
 	/* pg_proc OID of the aggregate itself */
 	regproc		aggfnoid BKI_LOOKUP(pg_proc);
diff --git a/src/include/catalog/pg_am.h b/src/include/catalog/pg_am.h
index f821749..e41bb37 100644
--- a/src/include/catalog/pg_am.h
+++ b/src/include/catalog/pg_am.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_am
  * ----------------
  */
-CATALOG(pg_am,2601,AccessMethodRelationId)
+CATALOG(pg_am,2601,AccessMethod)
 {
 	/* access method name */
 	NameData	amname;
diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h
index 4be3252..76139f2 100644
--- a/src/include/catalog/pg_amop.h
+++ b/src/include/catalog/pg_amop.h
@@ -51,7 +51,7 @@
  *		typedef struct FormData_pg_amop
  * ----------------
  */
-CATALOG(pg_amop,2602,AccessMethodOperatorRelationId)
+CATALOG(pg_amop,2602,AccessMethodOperator)
 {
 	/* the index opfamily this entry is for */
 	Oid			amopfamily BKI_LOOKUP(pg_opfamily);
diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h
index d638e0c..dfbcee2 100644
--- a/src/include/catalog/pg_amproc.h
+++ b/src/include/catalog/pg_amproc.h
@@ -40,7 +40,7 @@
  *		typedef struct FormData_pg_amproc
  * ----------------
  */
-CATALOG(pg_amproc,2603,AccessMethodProcedureRelationId)
+CATALOG(pg_amproc,2603,AccessMethodProcedure)
 {
 	/* the index opfamily this entry is for */
 	Oid			amprocfamily BKI_LOOKUP(pg_opfamily);
diff --git a/src/include/catalog/pg_attrdef.h b/src/include/catalog/pg_attrdef.h
index 16b106d..03e2a8a 100644
--- a/src/include/catalog/pg_attrdef.h
+++ b/src/include/catalog/pg_attrdef.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_attrdef
  * ----------------
  */
-CATALOG(pg_attrdef,2604,AttrDefaultRelationId)
+CATALOG(pg_attrdef,2604,AttrDefault)
 {
 	Oid			adrelid;		/* OID of table containing attribute */
 	int16		adnum;			/* attnum of attribute */
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index 8eef7d2..c9745e4 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,AttributeRelationId) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75,AttributeRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_attribute,1249,Attribute) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BKI_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 75bc2ba..4212f4b 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,AuthMemRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(2843,AuthMemRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_auth_members,1261,AuthMem) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(2843) BKI_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 863ef65..f647177 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,AuthIdRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842,AuthIdRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_authid,1260,AuthId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MACRO
 {
 	NameData	rolname;		/* name of role */
 	bool		rolsuper;		/* read this field via superuser() only! */
diff --git a/src/include/catalog/pg_cast.h b/src/include/catalog/pg_cast.h
index 10c796a..95b53b0 100644
--- a/src/include/catalog/pg_cast.h
+++ b/src/include/catalog/pg_cast.h
@@ -28,7 +28,7 @@
  *		typedef struct FormData_pg_cast
  * ----------------
  */
-CATALOG(pg_cast,2605,CastRelationId)
+CATALOG(pg_cast,2605,Cast)
 {
 	/* source datatype for cast */
 	Oid			castsource BKI_LOOKUP(pg_type);
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index ef62c30..f194dae 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,RelationRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83,RelationRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_class,1259,Relation) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
 {
 	NameData	relname;		/* class name */
 	Oid			relnamespace;	/* OID of namespace containing this class */
diff --git a/src/include/catalog/pg_collation.h b/src/include/catalog/pg_collation.h
index 5c73bbf..66f000f 100644
--- a/src/include/catalog/pg_collation.h
+++ b/src/include/catalog/pg_collation.h
@@ -27,7 +27,7 @@
  *		typedef struct FormData_pg_collation
  * ----------------
  */
-CATALOG(pg_collation,3456,CollationRelationId)
+CATALOG(pg_collation,3456,Collation)
 {
 	NameData	collname;		/* collation name */
 	Oid			collnamespace;	/* OID of namespace containing collation */
diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h
index 017e4de..d6a6619 100644
--- a/src/include/catalog/pg_constraint.h
+++ b/src/include/catalog/pg_constraint.h
@@ -29,7 +29,7 @@
  *		typedef struct FormData_pg_constraint
  * ----------------
  */
-CATALOG(pg_constraint,2606,ConstraintRelationId)
+CATALOG(pg_constraint,2606,Constraint)
 {
 	/*
 	 * conname + connamespace is deliberately not unique; we allow, for
diff --git a/src/include/catalog/pg_conversion.h b/src/include/catalog/pg_conversion.h
index 7ca54e8..6fc5385 100644
--- a/src/include/catalog/pg_conversion.h
+++ b/src/include/catalog/pg_conversion.h
@@ -37,7 +37,7 @@
  *	condefault			true if this is a default conversion
  * ----------------------------------------------------------------
  */
-CATALOG(pg_conversion,2607,ConversionRelationId)
+CATALOG(pg_conversion,2607,Conversion)
 {
 	NameData	conname;
 	Oid			connamespace;
diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h
index 7f03d24..24be0e7 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,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248,DatabaseRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_database,1262,Database) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_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 f6ae971..e6d4e72 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,DbRoleSettingRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_db_role_setting,2964,DbRoleSetting) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 {
 	Oid			setdatabase;	/* database */
 	Oid			setrole;		/* role */
diff --git a/src/include/catalog/pg_default_acl.h b/src/include/catalog/pg_default_acl.h
index d672d5b..08dbb86 100644
--- a/src/include/catalog/pg_default_acl.h
+++ b/src/include/catalog/pg_default_acl.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_default_acl
  * ----------------
  */
-CATALOG(pg_default_acl,826,DefaultAclRelationId)
+CATALOG(pg_default_acl,826,DefaultAcl)
 {
 	Oid			defaclrole;		/* OID of role owning this ACL */
 	Oid			defaclnamespace;	/* OID of namespace, or 0 for all */
diff --git a/src/include/catalog/pg_depend.h b/src/include/catalog/pg_depend.h
index bf31c1a..1043ab9 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,DependRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_depend,2608,Depend) BKI_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 b95b188..157b324 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,DescriptionRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_description,2609,Description) BKI_WITHOUT_OIDS
 {
 	Oid			objoid;			/* OID of object itself */
 	Oid			classoid;		/* OID of table containing object */
diff --git a/src/include/catalog/pg_enum.h b/src/include/catalog/pg_enum.h
index 52ec55d..59d4b41 100644
--- a/src/include/catalog/pg_enum.h
+++ b/src/include/catalog/pg_enum.h
@@ -27,7 +27,7 @@
  *		typedef struct FormData_pg_enum
  * ----------------
  */
-CATALOG(pg_enum,3501,EnumRelationId)
+CATALOG(pg_enum,3501,Enum)
 {
 	Oid			enumtypid;		/* OID of owning enum type */
 	float4		enumsortorder;	/* sort position of this enum value */
diff --git a/src/include/catalog/pg_event_trigger.h b/src/include/catalog/pg_event_trigger.h
index f06cbe0..798ce1d 100644
--- a/src/include/catalog/pg_event_trigger.h
+++ b/src/include/catalog/pg_event_trigger.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_event_trigger
  * ----------------
  */
-CATALOG(pg_event_trigger,3466,EventTriggerRelationId)
+CATALOG(pg_event_trigger,3466,EventTrigger)
 {
 	NameData	evtname;		/* trigger's name */
 	NameData	evtevent;		/* trigger's event */
diff --git a/src/include/catalog/pg_extension.h b/src/include/catalog/pg_extension.h
index 10bbb69..57a4895 100644
--- a/src/include/catalog/pg_extension.h
+++ b/src/include/catalog/pg_extension.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_extension
  * ----------------
  */
-CATALOG(pg_extension,3079,ExtensionRelationId)
+CATALOG(pg_extension,3079,Extension)
 {
 	NameData	extname;		/* extension name */
 	Oid			extowner;		/* extension owner */
diff --git a/src/include/catalog/pg_foreign_data_wrapper.h b/src/include/catalog/pg_foreign_data_wrapper.h
index 67e3319..25b9e08 100644
--- a/src/include/catalog/pg_foreign_data_wrapper.h
+++ b/src/include/catalog/pg_foreign_data_wrapper.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_foreign_data_wrapper
  * ----------------
  */
-CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapperRelationId)
+CATALOG(pg_foreign_data_wrapper,2328,ForeignDataWrapper)
 {
 	NameData	fdwname;		/* foreign-data wrapper name */
 	Oid			fdwowner;		/* FDW owner */
diff --git a/src/include/catalog/pg_foreign_server.h b/src/include/catalog/pg_foreign_server.h
index 0d25839..e0efdc8 100644
--- a/src/include/catalog/pg_foreign_server.h
+++ b/src/include/catalog/pg_foreign_server.h
@@ -25,7 +25,7 @@
  *		typedef struct FormData_pg_foreign_server
  * ----------------
  */
-CATALOG(pg_foreign_server,1417,ForeignServerRelationId)
+CATALOG(pg_foreign_server,1417,ForeignServer)
 {
 	NameData	srvname;		/* foreign server name */
 	Oid			srvowner;		/* server owner */
diff --git a/src/include/catalog/pg_foreign_table.h b/src/include/catalog/pg_foreign_table.h
index 13de918..c264c24 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,ForeignTableRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_foreign_table,3118,ForeignTable) BKI_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 88ff40f..dd3b4d4 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,IndexRelationId) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
+CATALOG(pg_index,2610,Index) BKI_WITHOUT_OIDS BKI_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 3303a9c..a167492 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,InheritsRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_inherits,2611,Inherits) BKI_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 6ce2646..f5f2c56 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,InitPrivsRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_init_privs,3394,InitPrivs) BKI_WITHOUT_OIDS
 {
 	Oid			objoid;			/* OID of object itself */
 	Oid			classoid;		/* OID of table containing object */
diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h
index e2d8d15..9988fbd 100644
--- a/src/include/catalog/pg_language.h
+++ b/src/include/catalog/pg_language.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_language
  * ----------------
  */
-CATALOG(pg_language,2612,LanguageRelationId)
+CATALOG(pg_language,2612,Language)
 {
 	NameData	lanname;		/* Language name */
 	Oid			lanowner;		/* Language's owner */
diff --git a/src/include/catalog/pg_largeobject.h b/src/include/catalog/pg_largeobject.h
index 481d2ff..ce8a70c 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,LargeObjectRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_largeobject,2613,LargeObject) BKI_WITHOUT_OIDS
 {
 	Oid			loid;			/* Identifier of large object */
 	int32		pageno;			/* Page number (starting from 0) */
diff --git a/src/include/catalog/pg_largeobject_metadata.h b/src/include/catalog/pg_largeobject_metadata.h
index a8732bc..a37acfe 100644
--- a/src/include/catalog/pg_largeobject_metadata.h
+++ b/src/include/catalog/pg_largeobject_metadata.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_largeobject_metadata
  * ----------------
  */
-CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadataRelationId)
+CATALOG(pg_largeobject_metadata,2995,LargeObjectMetadata)
 {
 	Oid			lomowner;		/* OID of the largeobject owner */
 
diff --git a/src/include/catalog/pg_namespace.h b/src/include/catalog/pg_namespace.h
index 0d9cada..1f56bc7 100644
--- a/src/include/catalog/pg_namespace.h
+++ b/src/include/catalog/pg_namespace.h
@@ -31,7 +31,7 @@
  *	nspacl				access privilege list
  * ----------------------------------------------------------------
  */
-CATALOG(pg_namespace,2615,NamespaceRelationId)
+CATALOG(pg_namespace,2615,Namespace)
 {
 	NameData	nspname;
 	Oid			nspowner;
diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h
index 16c3875..2eed9e6 100644
--- a/src/include/catalog/pg_opclass.h
+++ b/src/include/catalog/pg_opclass.h
@@ -46,7 +46,7 @@
  *		typedef struct FormData_pg_opclass
  * ----------------
  */
-CATALOG(pg_opclass,2616,OperatorClassRelationId)
+CATALOG(pg_opclass,2616,OperatorClass)
 {
 	/* index access method opclass is for */
 	Oid			opcmethod BKI_LOOKUP(pg_am);
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index bbf3303..53a78ed 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -29,7 +29,7 @@
  *		typedef struct FormData_pg_operator
  * ----------------
  */
-CATALOG(pg_operator,2617,OperatorRelationId)
+CATALOG(pg_operator,2617,Operator)
 {
 	/* name of operator */
 	NameData	oprname;
diff --git a/src/include/catalog/pg_opfamily.h b/src/include/catalog/pg_opfamily.h
index ddb0641..db3ac32 100644
--- a/src/include/catalog/pg_opfamily.h
+++ b/src/include/catalog/pg_opfamily.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_opfamily
  * ----------------
  */
-CATALOG(pg_opfamily,2753,OperatorFamilyRelationId)
+CATALOG(pg_opfamily,2753,OperatorFamily)
 {
 	/* index access method opfamily is for */
 	Oid			opfmethod BKI_LOOKUP(pg_am);
diff --git a/src/include/catalog/pg_partitioned_table.h b/src/include/catalog/pg_partitioned_table.h
index 676532a..bcec129 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,PartitionedRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_partitioned_table,3350,Partitioned) BKI_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 d84c86b..55f7b56 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,PLTemplateRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_pltemplate,1136,PLTemplate) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 {
 	NameData	tmplname;		/* name of PL */
 	bool		tmpltrusted;	/* PL is trusted? */
diff --git a/src/include/catalog/pg_policy.h b/src/include/catalog/pg_policy.h
index 45fdc28..925fbfc 100644
--- a/src/include/catalog/pg_policy.h
+++ b/src/include/catalog/pg_policy.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_policy
  * ----------------
  */
-CATALOG(pg_policy,3256,PolicyRelationId)
+CATALOG(pg_policy,3256,Policy)
 {
 	NameData	polname;		/* Policy name. */
 	Oid			polrelid;		/* Oid of the relation with policy. */
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 821bc60..94dca57 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,ProcedureRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81,ProcedureRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_proc,1255,Procedure) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81) BKI_SCHEMA_MACRO
 {
 	/* procedure name */
 	NameData	proname;
diff --git a/src/include/catalog/pg_publication.h b/src/include/catalog/pg_publication.h
index e81d62d..7111c1d 100644
--- a/src/include/catalog/pg_publication.h
+++ b/src/include/catalog/pg_publication.h
@@ -27,7 +27,7 @@
  *		typedef struct FormData_pg_publication
  * ----------------
  */
-CATALOG(pg_publication,6104,PublicationRelationId)
+CATALOG(pg_publication,6104,Publication)
 {
 	NameData	pubname;		/* name of the publication */
 
diff --git a/src/include/catalog/pg_publication_rel.h b/src/include/catalog/pg_publication_rel.h
index 2208e42..4ee2f1d 100644
--- a/src/include/catalog/pg_publication_rel.h
+++ b/src/include/catalog/pg_publication_rel.h
@@ -25,7 +25,7 @@
  *		typedef struct FormData_pg_publication_rel
  * ----------------
  */
-CATALOG(pg_publication_rel,6106,PublicationRelRelationId)
+CATALOG(pg_publication_rel,6106,PublicationRel)
 {
 	Oid			prpubid;		/* Oid of the publication */
 	Oid			prrelid;		/* Oid of the relation */
diff --git a/src/include/catalog/pg_range.h b/src/include/catalog/pg_range.h
index d8e16cc..3681b78 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,RangeRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_range,3541,Range) BKI_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 eacdd39..02621a6 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,ReplicationOriginRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_replication_origin,6000,ReplicationOrigin) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 {
 	/*
 	 * Locally known id that get included into WAL.
diff --git a/src/include/catalog/pg_rewrite.h b/src/include/catalog/pg_rewrite.h
index 7712586..f74a165 100644
--- a/src/include/catalog/pg_rewrite.h
+++ b/src/include/catalog/pg_rewrite.h
@@ -29,7 +29,7 @@
  *		typedef struct FormData_pg_rewrite
  * ----------------
  */
-CATALOG(pg_rewrite,2618,RewriteRelationId)
+CATALOG(pg_rewrite,2618,Rewrite)
 {
 	NameData	rulename;
 	Oid			ev_class;
diff --git a/src/include/catalog/pg_seclabel.h b/src/include/catalog/pg_seclabel.h
index 48d4548..a3a35f4 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,SecLabelRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_seclabel,3596,SecLabel) BKI_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 a13b05e..4632160 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,SequenceRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_sequence,2224,Sequence) BKI_WITHOUT_OIDS
 {
 	Oid			seqrelid;
 	Oid			seqtypid;
diff --git a/src/include/catalog/pg_shdepend.h b/src/include/catalog/pg_shdepend.h
index 0f8508c..a01d5fa 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,SharedDependRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_shdepend,1214,SharedDepend) BKI_SHARED_RELATION BKI_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 00fd0e0..07ff550 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,SharedDescriptionRelationId) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
+CATALOG(pg_shdescription,2396,SharedDescription) BKI_SHARED_RELATION BKI_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 22ecf98..91ff667 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,SharedSecLabelRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066,SharedSecLabelRelation_Rowtype_Id) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
+CATALOG(pg_shseclabel,3592,SharedSecLabel) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066) BKI_WITHOUT_OIDS BKI_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 d654d3d..a08f776 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,StatisticRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_statistic,2619,Statistic) BKI_WITHOUT_OIDS
 {
 	/* These fields form the unique key for the entry: */
 	Oid			starelid;		/* relation containing attribute */
diff --git a/src/include/catalog/pg_statistic_ext.h b/src/include/catalog/pg_statistic_ext.h
index 9ccfce7..1add3af 100644
--- a/src/include/catalog/pg_statistic_ext.h
+++ b/src/include/catalog/pg_statistic_ext.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_statistic_ext
  * ----------------
  */
-CATALOG(pg_statistic_ext,3381,StatisticExtRelationId)
+CATALOG(pg_statistic_ext,3381,StatisticExt)
 {
 	Oid			stxrelid;		/* relation containing attributes */
 
diff --git a/src/include/catalog/pg_subscription.h b/src/include/catalog/pg_subscription.h
index 7fc1c29..3c9b287 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,SubscriptionRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101,SubscriptionRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_subscription,6100,Subscription) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_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 8971b67..dbfd592 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,SubscriptionRelRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_subscription_rel,6102,SubscriptionRel) BKI_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 4782e78..1d6668e 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,TableSpaceRelationId) BKI_SHARED_RELATION
+CATALOG(pg_tablespace,1213,TableSpace) BKI_SHARED_RELATION
 {
 	NameData	spcname;		/* tablespace name */
 	Oid			spcowner;		/* owner of tablespace */
diff --git a/src/include/catalog/pg_transform.h b/src/include/catalog/pg_transform.h
index 6059b89..41efbb4 100644
--- a/src/include/catalog/pg_transform.h
+++ b/src/include/catalog/pg_transform.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_transform
  * ----------------
  */
-CATALOG(pg_transform,3576,TransformRelationId)
+CATALOG(pg_transform,3576,Transform)
 {
 	Oid			trftype;
 	Oid			trflang;
diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h
index 9955e62..0ce8ebe 100644
--- a/src/include/catalog/pg_trigger.h
+++ b/src/include/catalog/pg_trigger.h
@@ -31,7 +31,7 @@
  * to be associated with a deferrable constraint.
  * ----------------
  */
-CATALOG(pg_trigger,2620,TriggerRelationId)
+CATALOG(pg_trigger,2620,Trigger)
 {
 	Oid			tgrelid;		/* relation trigger is attached to */
 	NameData	tgname;			/* trigger's name */
diff --git a/src/include/catalog/pg_ts_config.h b/src/include/catalog/pg_ts_config.h
index d344bb7..d607f26 100644
--- a/src/include/catalog/pg_ts_config.h
+++ b/src/include/catalog/pg_ts_config.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_ts_config
  * ----------------
  */
-CATALOG(pg_ts_config,3602,TSConfigRelationId)
+CATALOG(pg_ts_config,3602,TSConfig)
 {
 	NameData	cfgname;		/* name of configuration */
 	Oid			cfgnamespace;	/* name space */
diff --git a/src/include/catalog/pg_ts_config_map.h b/src/include/catalog/pg_ts_config_map.h
index 2120021..aea4f31 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,TSConfigMapRelationId) BKI_WITHOUT_OIDS
+CATALOG(pg_ts_config_map,3603,TSConfigMap) BKI_WITHOUT_OIDS
 {
 	Oid			mapcfg;			/* OID of configuration owning this entry */
 	int32		maptokentype;	/* token type from parser */
diff --git a/src/include/catalog/pg_ts_dict.h b/src/include/catalog/pg_ts_dict.h
index 1e285ad..46a89fb 100644
--- a/src/include/catalog/pg_ts_dict.h
+++ b/src/include/catalog/pg_ts_dict.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_ts_dict
  * ----------------
  */
-CATALOG(pg_ts_dict,3600,TSDictionaryRelationId)
+CATALOG(pg_ts_dict,3600,TSDictionary)
 {
 	NameData	dictname;		/* dictionary name */
 	Oid			dictnamespace;	/* name space */
diff --git a/src/include/catalog/pg_ts_parser.h b/src/include/catalog/pg_ts_parser.h
index ccaf40b..dba4935 100644
--- a/src/include/catalog/pg_ts_parser.h
+++ b/src/include/catalog/pg_ts_parser.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_ts_parser
  * ----------------
  */
-CATALOG(pg_ts_parser,3601,TSParserRelationId)
+CATALOG(pg_ts_parser,3601,TSParser)
 {
 	/* parser's name */
 	NameData	prsname;
diff --git a/src/include/catalog/pg_ts_template.h b/src/include/catalog/pg_ts_template.h
index 5e66e02..f3bd842 100644
--- a/src/include/catalog/pg_ts_template.h
+++ b/src/include/catalog/pg_ts_template.h
@@ -26,7 +26,7 @@
  *		typedef struct FormData_pg_ts_template
  * ----------------
  */
-CATALOG(pg_ts_template,3764,TSTemplateRelationId)
+CATALOG(pg_ts_template,3764,TSTemplate)
 {
 	/* template name */
 	NameData	tmplname;
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 8f301db..efe9206 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,TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71,TypeRelation_Rowtype_Id) BKI_SCHEMA_MACRO
+CATALOG(pg_type,1247,Type) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
 {
 	/* type name */
 	NameData	typname;
diff --git a/src/include/catalog/pg_user_mapping.h b/src/include/catalog/pg_user_mapping.h
index 6efbed0..e50c635 100644
--- a/src/include/catalog/pg_user_mapping.h
+++ b/src/include/catalog/pg_user_mapping.h
@@ -25,7 +25,7 @@
  *		typedef struct FormData_pg_user_mapping
  * ----------------
  */
-CATALOG(pg_user_mapping,1418,UserMappingRelationId)
+CATALOG(pg_user_mapping,1418,UserMapping)
 {
 	Oid			umuser;			/* Id of the user, InvalidOid if PUBLIC is
 								 * wanted */
diff --git a/src/include/catalog/unused_oids b/src/include/catalog/unused_oids
index f71222d..e8be34c 100755
--- a/src/include/catalog/unused_oids
+++ b/src/include/catalog/unused_oids
@@ -30,7 +30,7 @@ export FIRSTOBJECTID
 cat pg_*.h pg_*.dat toasting.h indexing.h |
 egrep -v -e '^CATALOG\(.*BKI_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]*\).*BKI_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

