From 7436cb981e21782f058ae97c1f63c0dc67fac57c Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Sun, 24 Dec 2017 20:23:24 +0700
Subject: [PATCH v5 13/13] Move toast/index macros to the pg_* catalog headers.

This makes the catalog headers the Single Point of Truth for schema info.
Some files included toasting.h or indexing.h solely for the OID of a
catalog's index or toast table. This patch removes those #includes.
---
 contrib/dblink/dblink.c                       |   1 -
 contrib/sepgsql/database.c                    |   1 -
 contrib/sepgsql/proc.c                        |   1 -
 contrib/sepgsql/relation.c                    |   1 -
 contrib/sepgsql/schema.c                      |   1 -
 src/backend/catalog/Catalog.pm                |   4 -
 src/backend/catalog/Makefile                  |   4 +-
 src/backend/catalog/README                    |   8 +-
 src/backend/catalog/catalog.c                 |   2 -
 src/backend/catalog/genbki.pl                 |  13 +-
 src/backend/catalog/objectaddress.c           |   1 -
 src/backend/catalog/pg_inherits.c             |   1 -
 src/backend/commands/aggregatecmds.c          |   1 -
 src/backend/commands/indexcmds.c              |   1 -
 src/backend/replication/logical/message.c     |   2 -
 src/backend/utils/adt/enum.c                  |   1 -
 src/backend/utils/cache/relfilenodemap.c      |   1 -
 src/backend/utils/cache/syscache.c            |   1 -
 src/backend/utils/cache/ts_cache.c            |   1 -
 src/backend/utils/cache/typcache.c            |   1 -
 src/backend/utils/init/postinit.c             |   1 -
 src/include/catalog/duplicate_oids            |   2 +-
 src/include/catalog/genbki.h                  |  23 ++
 src/include/catalog/indexing.h                | 322 --------------------------
 src/include/catalog/pg_aggregate.h            |   3 +
 src/include/catalog/pg_am.h                   |   5 +
 src/include/catalog/pg_amop.h                 |   7 +
 src/include/catalog/pg_amproc.h               |   5 +
 src/include/catalog/pg_attrdef.h              |   7 +
 src/include/catalog/pg_attribute.h            |   5 +
 src/include/catalog/pg_auth_members.h         |   5 +
 src/include/catalog/pg_authid.h               |   4 +
 src/include/catalog/pg_cast.h                 |   5 +
 src/include/catalog/pg_class.h                |   7 +
 src/include/catalog/pg_collation.h            |   5 +
 src/include/catalog/pg_constraint.h           |  10 +
 src/include/catalog/pg_conversion.h           |   7 +
 src/include/catalog/pg_database.h             |   5 +
 src/include/catalog/pg_db_role_setting.h      |   6 +
 src/include/catalog/pg_default_acl.h          |   5 +
 src/include/catalog/pg_depend.h               |   5 +
 src/include/catalog/pg_description.h          |   4 +
 src/include/catalog/pg_enum.h                 |   7 +
 src/include/catalog/pg_event_trigger.h        |   5 +
 src/include/catalog/pg_extension.h            |   5 +
 src/include/catalog/pg_foreign_data_wrapper.h |   5 +
 src/include/catalog/pg_foreign_server.h       |   5 +
 src/include/catalog/pg_foreign_table.h        |   3 +
 src/include/catalog/pg_index.h                |   5 +
 src/include/catalog/pg_inherits.h             |   5 +
 src/include/catalog/pg_init_privs.h           |   3 +
 src/include/catalog/pg_language.h             |   5 +
 src/include/catalog/pg_largeobject.h          |   3 +
 src/include/catalog/pg_largeobject_metadata.h |   3 +
 src/include/catalog/pg_namespace.h            |   5 +
 src/include/catalog/pg_opclass.h              |   5 +
 src/include/catalog/pg_operator.h             |   5 +
 src/include/catalog/pg_opfamily.h             |   5 +
 src/include/catalog/pg_partitioned_table.h    |   3 +
 src/include/catalog/pg_pltemplate.h           |   3 +
 src/include/catalog/pg_policy.h               |   5 +
 src/include/catalog/pg_proc.h                 |   6 +
 src/include/catalog/pg_publication.h          |   7 +
 src/include/catalog/pg_publication_rel.h      |   3 +
 src/include/catalog/pg_range.h                |   3 +
 src/include/catalog/pg_replication_origin.h   |   5 +
 src/include/catalog/pg_rewrite.h              |   6 +
 src/include/catalog/pg_seclabel.h             |   4 +
 src/include/catalog/pg_sequence.h             |   3 +
 src/include/catalog/pg_shdepend.h             |   5 +
 src/include/catalog/pg_shdescription.h        |   6 +
 src/include/catalog/pg_shseclabel.h           |   6 +
 src/include/catalog/pg_statistic.h            |   5 +-
 src/include/catalog/pg_statistic_ext.h        |   8 +
 src/include/catalog/pg_subscription.h         |   5 +
 src/include/catalog/pg_subscription_rel.h     |   3 +
 src/include/catalog/pg_tablespace.h           |   5 +
 src/include/catalog/pg_transform.h            |   5 +
 src/include/catalog/pg_trigger.h              |   8 +
 src/include/catalog/pg_ts_config.h            |   5 +
 src/include/catalog/pg_ts_config_map.h        |   3 +
 src/include/catalog/pg_ts_dict.h              |   5 +
 src/include/catalog/pg_ts_parser.h            |   5 +
 src/include/catalog/pg_ts_template.h          |   5 +
 src/include/catalog/pg_type.h                 |   5 +
 src/include/catalog/pg_user_mapping.h         |   5 +
 src/include/catalog/toasting.h                |  40 ----
 src/include/catalog/unused_oids               |   2 +-
 88 files changed, 347 insertions(+), 401 deletions(-)

diff --git a/contrib/dblink/dblink.c b/contrib/dblink/dblink.c
index a7e22b3..664b23d 100644
--- a/contrib/dblink/dblink.c
+++ b/contrib/dblink/dblink.c
@@ -38,7 +38,6 @@
 
 #include "access/htup_details.h"
 #include "access/reloptions.h"
-#include "catalog/indexing.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_foreign_data_wrapper.h"
 #include "catalog/pg_foreign_server.h"
diff --git a/contrib/sepgsql/database.c b/contrib/sepgsql/database.c
index 8fc5a87..66f71b4 100644
--- a/contrib/sepgsql/database.c
+++ b/contrib/sepgsql/database.c
@@ -16,7 +16,6 @@
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
 #include "catalog/pg_database.h"
-#include "catalog/indexing.h"
 #include "commands/dbcommands.h"
 #include "commands/seclabel.h"
 #include "utils/builtins.h"
diff --git a/contrib/sepgsql/proc.c b/contrib/sepgsql/proc.c
index 14faa5fa..f1045cf 100644
--- a/contrib/sepgsql/proc.c
+++ b/contrib/sepgsql/proc.c
@@ -15,7 +15,6 @@
 #include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_namespace.h"
 #include "catalog/pg_proc.h"
 #include "catalog/pg_type.h"
diff --git a/contrib/sepgsql/relation.c b/contrib/sepgsql/relation.c
index 228869a..df0dd65 100644
--- a/contrib/sepgsql/relation.c
+++ b/contrib/sepgsql/relation.c
@@ -14,7 +14,6 @@
 #include "access/heapam.h"
 #include "access/htup_details.h"
 #include "access/sysattr.h"
-#include "catalog/indexing.h"
 #include "catalog/dependency.h"
 #include "catalog/pg_attribute.h"
 #include "catalog/pg_class.h"
diff --git a/contrib/sepgsql/schema.c b/contrib/sepgsql/schema.c
index d418577..5ca87e7 100644
--- a/contrib/sepgsql/schema.c
+++ b/contrib/sepgsql/schema.c
@@ -15,7 +15,6 @@
 #include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/dependency.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_database.h"
 #include "catalog/pg_namespace.h"
 #include "commands/seclabel.h"
diff --git a/src/backend/catalog/Catalog.pm b/src/backend/catalog/Catalog.pm
index 49195dc..9ed67b7 100644
--- a/src/backend/catalog/Catalog.pm
+++ b/src/backend/catalog/Catalog.pm
@@ -82,10 +82,6 @@ sub ParseHeader
 				$is_unique ? 'unique ' : '',
 				$index_name, $index_oid, $using);
 		}
-		elsif (/^BUILD_INDICES/)
-		{
-			push @{ $catalog{indexing} }, "build indices\n";
-		}
 		elsif (/^CATALOG\(([^,]*),(\d+)\)/)
 		{
 			$catalog{catname} = $1;
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
index 270dc9e..ae2f405 100644
--- a/src/backend/catalog/Makefile
+++ b/src/backend/catalog/Makefile
@@ -25,8 +25,7 @@ include $(top_srcdir)/src/backend/common.mk
 all: $(BKIFILES) oid_symbols.h schemapg.h
 
 # Note: there are some undocumented dependencies on the ordering in which
-# the catalog header files are assembled into postgres.bki.  In particular,
-# indexing.h had better be last, and toasting.h just before it.
+# the catalog header files are assembled into postgres.bki.
 
 POSTGRES_BKI_SRCS = $(addprefix $(top_srcdir)/src/include/catalog/,\
 	pg_proc.h pg_type.h pg_attribute.h pg_class.h \
@@ -46,7 +45,6 @@ POSTGRES_BKI_SRCS = $(addprefix $(top_srcdir)/src/include/catalog/,\
 	pg_collation.h pg_partitioned_table.h pg_range.h pg_transform.h \
 	pg_sequence.h pg_publication.h pg_publication_rel.h pg_subscription.h \
 	pg_subscription_rel.h \
-	toasting.h indexing.h \
     )
 
 POSTGRES_BKI_DATA = $(wildcard $(top_srcdir)/src/include/catalog/*.dat)
diff --git a/src/backend/catalog/README b/src/backend/catalog/README
index 72aad06..72b0b4c 100644
--- a/src/backend/catalog/README
+++ b/src/backend/catalog/README
@@ -137,10 +137,10 @@ POSTGRES_BKI_SRCS variable, as these cannot be created through the standard
 heap_create_with_catalog process, because it needs these tables to exist
 already.  The list of files this currently includes is:
 	pg_proc.h pg_type.h pg_attribute.h pg_class.h
-Also, indexing.h must be last, since the indexes can't be created until all
-the tables are in place, and toasting.h should probably be next-to-last
-(or at least after all the tables that need toast tables).  There are
-reputedly some other order dependencies in the .bki list, too.
+There are reputedly some other order dependencies in the BKI list, too.
+
+-As of Postgres 11, toast and index declarations are stored in the relevant
+pg_*.h file, and not in toasting.h or indexing.h.
 
 -----------------------------------------------------------------
 
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index f50ae3e..fc8c5ed 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -24,7 +24,6 @@
 #include "access/sysattr.h"
 #include "access/transam.h"
 #include "catalog/catalog.h"
-#include "catalog/indexing.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_auth_members.h"
 #include "catalog/pg_authid.h"
@@ -39,7 +38,6 @@
 #include "catalog/pg_subscription.h"
 #include "catalog/pg_tablespace.h"
 #include "catalog/pg_type.h"
-#include "catalog/toasting.h"
 #include "miscadmin.h"
 #include "storage/fd.h"
 #include "utils/fmgroids.h"
diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl
index 640dc9e..f5bcd9f 100644
--- a/src/backend/catalog/genbki.pl
+++ b/src/backend/catalog/genbki.pl
@@ -92,11 +92,8 @@ foreach my $header (@input_files)
 	my $catname = $catalog->{catname};
 	my $schema  = $catalog->{columns};
 
-	if (defined $catname)
-	{
-		push @catnames, $catname;
-		$catalogs{$catname} = $catalog;
-	}
+	push @catnames, $catname;
+	$catalogs{$catname} = $catalog;
 
 	if (-e $datfile)
 	{
@@ -392,7 +389,10 @@ foreach my $catname (@catnames)
 # Any information needed for the BKI that is not contained in a pg_*.h header
 # (i.e., not contained in a header with a CATALOG() statement) comes here
 
-# Write out declare toast/index statements
+# Write out declare toast/index statements. Index commands must be last,
+# since the indexes can't be created until all the tables are in place,
+# and toast commands are next-to-last to make sure they are run after
+# creating all the tables that need toast tables.
 foreach my $declaration (@toast_decls)
 {
 	print $bki $declaration;
@@ -402,6 +402,7 @@ foreach my $declaration (@index_decls)
 {
 	print $bki $declaration;
 }
+print $bki "build indices\n";
 
 
 # Now generate schemapg.h
diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c
index 9553675..f32cd9e 100644
--- a/src/backend/catalog/objectaddress.c
+++ b/src/backend/catalog/objectaddress.c
@@ -18,7 +18,6 @@
 #include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/catalog.h"
-#include "catalog/indexing.h"
 #include "catalog/objectaddress.h"
 #include "catalog/pg_am.h"
 #include "catalog/pg_amop.h"
diff --git a/src/backend/catalog/pg_inherits.c b/src/backend/catalog/pg_inherits.c
index 1bd8a58..94a4bf9 100644
--- a/src/backend/catalog/pg_inherits.c
+++ b/src/backend/catalog/pg_inherits.c
@@ -22,7 +22,6 @@
 #include "access/genam.h"
 #include "access/heapam.h"
 #include "access/htup_details.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_inherits.h"
 #include "catalog/pg_inherits_fn.h"
 #include "parser/parse_type.h"
diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c
index 2e2ee88..d09ca8a 100644
--- a/src/backend/commands/aggregatecmds.c
+++ b/src/backend/commands/aggregatecmds.c
@@ -24,7 +24,6 @@
 
 #include "access/htup_details.h"
 #include "catalog/dependency.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_aggregate.h"
 #include "catalog/pg_aggregate_fn.h"
 #include "catalog/pg_proc.h"
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 97091dd..0daa020 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -22,7 +22,6 @@
 #include "access/xact.h"
 #include "catalog/catalog.h"
 #include "catalog/index.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_am.h"
 #include "catalog/pg_opclass.h"
 #include "catalog/pg_opfamily.h"
diff --git a/src/backend/replication/logical/message.c b/src/backend/replication/logical/message.c
index ef7d6c5..7a72f88 100644
--- a/src/backend/replication/logical/message.c
+++ b/src/backend/replication/logical/message.c
@@ -35,8 +35,6 @@
 
 #include "access/xact.h"
 
-#include "catalog/indexing.h"
-
 #include "nodes/execnodes.h"
 
 #include "replication/message.h"
diff --git a/src/backend/utils/adt/enum.c b/src/backend/utils/adt/enum.c
index 048a08d..b3dae6b 100644
--- a/src/backend/utils/adt/enum.c
+++ b/src/backend/utils/adt/enum.c
@@ -16,7 +16,6 @@
 #include "access/genam.h"
 #include "access/heapam.h"
 #include "access/htup_details.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_enum.h"
 #include "libpq/pqformat.h"
 #include "utils/array.h"
diff --git a/src/backend/utils/cache/relfilenodemap.c b/src/backend/utils/cache/relfilenodemap.c
index 3e811e1..0526781 100644
--- a/src/backend/utils/cache/relfilenodemap.c
+++ b/src/backend/utils/cache/relfilenodemap.c
@@ -16,7 +16,6 @@
 #include "access/genam.h"
 #include "access/heapam.h"
 #include "access/htup_details.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_class.h"
 #include "catalog/pg_tablespace.h"
 #include "miscadmin.h"
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index 888edbb..e547c2c 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -22,7 +22,6 @@
 
 #include "access/htup_details.h"
 #include "access/sysattr.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_aggregate.h"
 #include "catalog/pg_am.h"
 #include "catalog/pg_amop.h"
diff --git a/src/backend/utils/cache/ts_cache.c b/src/backend/utils/cache/ts_cache.c
index 29cf93a..f5c8d66 100644
--- a/src/backend/utils/cache/ts_cache.c
+++ b/src/backend/utils/cache/ts_cache.c
@@ -30,7 +30,6 @@
 #include "access/heapam.h"
 #include "access/htup_details.h"
 #include "access/xact.h"
-#include "catalog/indexing.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_ts_config.h"
 #include "catalog/pg_ts_config_map.h"
diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c
index f6450c4..2fdc34d 100644
--- a/src/backend/utils/cache/typcache.c
+++ b/src/backend/utils/cache/typcache.c
@@ -48,7 +48,6 @@
 #include "access/nbtree.h"
 #include "access/parallel.h"
 #include "access/session.h"
-#include "catalog/indexing.h"
 #include "catalog/pg_am.h"
 #include "catalog/pg_constraint.h"
 #include "catalog/pg_enum.h"
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 20f1d27..128255b 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -26,7 +26,6 @@
 #include "access/xact.h"
 #include "access/xlog.h"
 #include "catalog/catalog.h"
-#include "catalog/indexing.h"
 #include "catalog/namespace.h"
 #include "catalog/pg_authid.h"
 #include "catalog/pg_database.h"
diff --git a/src/include/catalog/duplicate_oids b/src/include/catalog/duplicate_oids
index 9732f61..e7af174 100755
--- a/src/include/catalog/duplicate_oids
+++ b/src/include/catalog/duplicate_oids
@@ -5,7 +5,7 @@ use warnings;
 
 BEGIN
 {
-	@ARGV = (glob("pg_*.h"), glob("pg_*.dat"), qw(indexing.h toasting.h));
+	@ARGV = (glob("pg_*.h"), glob("pg_*.dat"));
 }
 
 my %oidcounts;
diff --git a/src/include/catalog/genbki.h b/src/include/catalog/genbki.h
index 70d2761..9735430 100644
--- a/src/include/catalog/genbki.h
+++ b/src/include/catalog/genbki.h
@@ -57,4 +57,27 @@
  */
 #undef CATALOG_VARLEN
 
+/*
+ * Statements the bootstrap parser will turn into BootstrapToastTable
+ * commands. Each line specifies the system catalog that needs a toast
+ * table, the OID to assign to the toast table, and the OID to assign to
+ * the toast table's index.  The reason we hard-wire these OIDs is that we
+ * need stable OIDs for shared relations, and that includes toast tables of
+ * shared relations.
+ */
+#define DECLARE_TOAST(name,toastoid,indexoid)
+
+/* Statements the bootstrap parser will turn into DefineIndex calls.
+ * The keyword is DECLARE_INDEX or DECLARE_UNIQUE_INDEX.  The first two
+ * arguments are the index name and OID, the rest is much like a standard
+ * 'create index' SQL command.
+ *
+ * For each index, we also provide a #define for its OID.  References to
+ * the index in the C code should always use these #defines, not the actual
+ * index name (much less the numeric OID).
+ */
+#define DECLARE_INDEX(name,oid,decl)
+#define DECLARE_UNIQUE_INDEX(name,oid,decl)
+
+
 #endif							/* GENBKI_H */
diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h
index f1f42a8..fb843f7 100644
--- a/src/include/catalog/indexing.h
+++ b/src/include/catalog/indexing.h
@@ -40,326 +40,4 @@ extern void CatalogTupleUpdateWithInfo(Relation heapRel,
 						   CatalogIndexState indstate);
 extern void CatalogTupleDelete(Relation heapRel, ItemPointer tid);
 
-
-/*
- * These macros are just to keep the C compiler from spitting up on the
- * 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
-#define BUILD_INDICES
-
-
-/*
- * What follows are lines processed by genbki.pl to create the statements
- * the bootstrap parser will turn into DefineIndex calls.
- *
- * The keyword is DECLARE_INDEX or DECLARE_UNIQUE_INDEX.  The first two
- * arguments are the index name and OID, the rest is much like a standard
- * 'create index' SQL command.
- *
- * For each index, we also provide a #define for its OID.  References to
- * the index in the C code should always use these #defines, not the actual
- * index name (much less the numeric OID).
- */
-
-DECLARE_UNIQUE_INDEX(pg_aggregate_fnoid_index, 2650, on pg_aggregate using btree(aggfnoid oid_ops));
-#define AggregateFnoidIndexId  2650
-
-DECLARE_UNIQUE_INDEX(pg_am_name_index, 2651, on pg_am using btree(amname name_ops));
-#define AmNameIndexId  2651
-DECLARE_UNIQUE_INDEX(pg_am_oid_index, 2652, on pg_am using btree(oid oid_ops));
-#define AmOidIndexId  2652
-
-DECLARE_UNIQUE_INDEX(pg_amop_fam_strat_index, 2653, on pg_amop using btree(amopfamily oid_ops, amoplefttype oid_ops, amoprighttype oid_ops, amopstrategy int2_ops));
-#define AccessMethodStrategyIndexId  2653
-DECLARE_UNIQUE_INDEX(pg_amop_opr_fam_index, 2654, on pg_amop using btree(amopopr oid_ops, amoppurpose char_ops, amopfamily oid_ops));
-#define AccessMethodOperatorIndexId  2654
-DECLARE_UNIQUE_INDEX(pg_amop_oid_index, 2756, on pg_amop using btree(oid oid_ops));
-#define AccessMethodOperatorOidIndexId	2756
-
-DECLARE_UNIQUE_INDEX(pg_amproc_fam_proc_index, 2655, on pg_amproc using btree(amprocfamily oid_ops, amproclefttype oid_ops, amprocrighttype oid_ops, amprocnum int2_ops));
-#define AccessMethodProcedureIndexId  2655
-DECLARE_UNIQUE_INDEX(pg_amproc_oid_index, 2757, on pg_amproc using btree(oid oid_ops));
-#define AccessMethodProcedureOidIndexId  2757
-
-DECLARE_UNIQUE_INDEX(pg_attrdef_adrelid_adnum_index, 2656, on pg_attrdef using btree(adrelid oid_ops, adnum int2_ops));
-#define AttrDefaultIndexId	2656
-DECLARE_UNIQUE_INDEX(pg_attrdef_oid_index, 2657, on pg_attrdef using btree(oid oid_ops));
-#define AttrDefaultOidIndexId  2657
-
-DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnam_index, 2658, on pg_attribute using btree(attrelid oid_ops, attname name_ops));
-#define AttributeRelidNameIndexId  2658
-DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnum_index, 2659, on pg_attribute using btree(attrelid oid_ops, attnum int2_ops));
-#define AttributeRelidNumIndexId  2659
-
-DECLARE_UNIQUE_INDEX(pg_authid_rolname_index, 2676, on pg_authid using btree(rolname name_ops));
-#define AuthIdRolnameIndexId	2676
-DECLARE_UNIQUE_INDEX(pg_authid_oid_index, 2677, on pg_authid using btree(oid oid_ops));
-#define AuthIdOidIndexId	2677
-
-DECLARE_UNIQUE_INDEX(pg_auth_members_role_member_index, 2694, on pg_auth_members using btree(roleid oid_ops, member oid_ops));
-#define AuthMemRoleMemIndexId	2694
-DECLARE_UNIQUE_INDEX(pg_auth_members_member_role_index, 2695, on pg_auth_members using btree(member oid_ops, roleid oid_ops));
-#define AuthMemMemRoleIndexId	2695
-
-DECLARE_UNIQUE_INDEX(pg_cast_oid_index, 2660, on pg_cast using btree(oid oid_ops));
-#define CastOidIndexId	2660
-DECLARE_UNIQUE_INDEX(pg_cast_source_target_index, 2661, on pg_cast using btree(castsource oid_ops, casttarget oid_ops));
-#define CastSourceTargetIndexId  2661
-
-DECLARE_UNIQUE_INDEX(pg_class_oid_index, 2662, on pg_class using btree(oid oid_ops));
-#define ClassOidIndexId  2662
-DECLARE_UNIQUE_INDEX(pg_class_relname_nsp_index, 2663, on pg_class using btree(relname name_ops, relnamespace oid_ops));
-#define ClassNameNspIndexId  2663
-DECLARE_INDEX(pg_class_tblspc_relfilenode_index, 3455, on pg_class using btree(reltablespace oid_ops, relfilenode oid_ops));
-#define ClassTblspcRelfilenodeIndexId  3455
-
-DECLARE_UNIQUE_INDEX(pg_collation_name_enc_nsp_index, 3164, on pg_collation using btree(collname name_ops, collencoding int4_ops, collnamespace oid_ops));
-#define CollationNameEncNspIndexId 3164
-DECLARE_UNIQUE_INDEX(pg_collation_oid_index, 3085, on pg_collation using btree(oid oid_ops));
-#define CollationOidIndexId  3085
-
-DECLARE_INDEX(pg_constraint_conname_nsp_index, 2664, on pg_constraint using btree(conname name_ops, connamespace oid_ops));
-#define ConstraintNameNspIndexId  2664
-DECLARE_INDEX(pg_constraint_conrelid_index, 2665, on pg_constraint using btree(conrelid oid_ops));
-#define ConstraintRelidIndexId	2665
-DECLARE_INDEX(pg_constraint_contypid_index, 2666, on pg_constraint using btree(contypid oid_ops));
-#define ConstraintTypidIndexId	2666
-DECLARE_UNIQUE_INDEX(pg_constraint_oid_index, 2667, on pg_constraint using btree(oid oid_ops));
-#define ConstraintOidIndexId  2667
-
-DECLARE_UNIQUE_INDEX(pg_conversion_default_index, 2668, on pg_conversion using btree(connamespace oid_ops, conforencoding int4_ops, contoencoding int4_ops, oid oid_ops));
-#define ConversionDefaultIndexId  2668
-DECLARE_UNIQUE_INDEX(pg_conversion_name_nsp_index, 2669, on pg_conversion using btree(conname name_ops, connamespace oid_ops));
-#define ConversionNameNspIndexId  2669
-DECLARE_UNIQUE_INDEX(pg_conversion_oid_index, 2670, on pg_conversion using btree(oid oid_ops));
-#define ConversionOidIndexId  2670
-
-DECLARE_UNIQUE_INDEX(pg_database_datname_index, 2671, on pg_database using btree(datname name_ops));
-#define DatabaseNameIndexId  2671
-DECLARE_UNIQUE_INDEX(pg_database_oid_index, 2672, on pg_database using btree(oid oid_ops));
-#define DatabaseOidIndexId	2672
-
-DECLARE_INDEX(pg_depend_depender_index, 2673, on pg_depend using btree(classid oid_ops, objid oid_ops, objsubid int4_ops));
-#define DependDependerIndexId  2673
-DECLARE_INDEX(pg_depend_reference_index, 2674, on pg_depend using btree(refclassid oid_ops, refobjid oid_ops, refobjsubid int4_ops));
-#define DependReferenceIndexId	2674
-
-DECLARE_UNIQUE_INDEX(pg_description_o_c_o_index, 2675, on pg_description using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops));
-#define DescriptionObjIndexId  2675
-DECLARE_UNIQUE_INDEX(pg_shdescription_o_c_index, 2397, on pg_shdescription using btree(objoid oid_ops, classoid oid_ops));
-#define SharedDescriptionObjIndexId 2397
-
-DECLARE_UNIQUE_INDEX(pg_enum_oid_index, 3502, on pg_enum using btree(oid oid_ops));
-#define EnumOidIndexId	3502
-DECLARE_UNIQUE_INDEX(pg_enum_typid_label_index, 3503, on pg_enum using btree(enumtypid oid_ops, enumlabel name_ops));
-#define EnumTypIdLabelIndexId 3503
-DECLARE_UNIQUE_INDEX(pg_enum_typid_sortorder_index, 3534, on pg_enum using btree(enumtypid oid_ops, enumsortorder float4_ops));
-#define EnumTypIdSortOrderIndexId 3534
-
-DECLARE_INDEX(pg_index_indrelid_index, 2678, on pg_index using btree(indrelid oid_ops));
-#define IndexIndrelidIndexId  2678
-DECLARE_UNIQUE_INDEX(pg_index_indexrelid_index, 2679, on pg_index using btree(indexrelid oid_ops));
-#define IndexRelidIndexId  2679
-
-DECLARE_UNIQUE_INDEX(pg_inherits_relid_seqno_index, 2680, on pg_inherits using btree(inhrelid oid_ops, inhseqno int4_ops));
-#define InheritsRelidSeqnoIndexId  2680
-DECLARE_INDEX(pg_inherits_parent_index, 2187, on pg_inherits using btree(inhparent oid_ops));
-#define InheritsParentIndexId  2187
-
-DECLARE_UNIQUE_INDEX(pg_init_privs_o_c_o_index, 3395, on pg_init_privs using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops));
-#define InitPrivsObjIndexId  3395
-
-DECLARE_UNIQUE_INDEX(pg_language_name_index, 2681, on pg_language using btree(lanname name_ops));
-#define LanguageNameIndexId  2681
-DECLARE_UNIQUE_INDEX(pg_language_oid_index, 2682, on pg_language using btree(oid oid_ops));
-#define LanguageOidIndexId	2682
-
-DECLARE_UNIQUE_INDEX(pg_largeobject_loid_pn_index, 2683, on pg_largeobject using btree(loid oid_ops, pageno int4_ops));
-#define LargeObjectLOidPNIndexId  2683
-
-DECLARE_UNIQUE_INDEX(pg_largeobject_metadata_oid_index, 2996, on pg_largeobject_metadata using btree(oid oid_ops));
-#define LargeObjectMetadataOidIndexId	2996
-
-DECLARE_UNIQUE_INDEX(pg_statistic_ext_oid_index, 3380, on pg_statistic_ext using btree(oid oid_ops));
-#define StatisticExtOidIndexId	3380
-DECLARE_UNIQUE_INDEX(pg_statistic_ext_name_index, 3997, on pg_statistic_ext using btree(stxname name_ops, stxnamespace oid_ops));
-#define StatisticExtNameIndexId 3997
-DECLARE_INDEX(pg_statistic_ext_relid_index, 3379, on pg_statistic_ext using btree(stxrelid oid_ops));
-#define StatisticExtRelidIndexId 3379
-
-DECLARE_UNIQUE_INDEX(pg_namespace_nspname_index, 2684, on pg_namespace using btree(nspname name_ops));
-#define NamespaceNameIndexId  2684
-DECLARE_UNIQUE_INDEX(pg_namespace_oid_index, 2685, on pg_namespace using btree(oid oid_ops));
-#define NamespaceOidIndexId  2685
-
-DECLARE_UNIQUE_INDEX(pg_opclass_am_name_nsp_index, 2686, on pg_opclass using btree(opcmethod oid_ops, opcname name_ops, opcnamespace oid_ops));
-#define OpclassAmNameNspIndexId  2686
-DECLARE_UNIQUE_INDEX(pg_opclass_oid_index, 2687, on pg_opclass using btree(oid oid_ops));
-#define OpclassOidIndexId  2687
-
-DECLARE_UNIQUE_INDEX(pg_operator_oid_index, 2688, on pg_operator using btree(oid oid_ops));
-#define OperatorOidIndexId	2688
-DECLARE_UNIQUE_INDEX(pg_operator_oprname_l_r_n_index, 2689, on pg_operator using btree(oprname name_ops, oprleft oid_ops, oprright oid_ops, oprnamespace oid_ops));
-#define OperatorNameNspIndexId	2689
-
-DECLARE_UNIQUE_INDEX(pg_opfamily_am_name_nsp_index, 2754, on pg_opfamily using btree(opfmethod oid_ops, opfname name_ops, opfnamespace oid_ops));
-#define OpfamilyAmNameNspIndexId  2754
-DECLARE_UNIQUE_INDEX(pg_opfamily_oid_index, 2755, on pg_opfamily using btree(oid oid_ops));
-#define OpfamilyOidIndexId	2755
-
-DECLARE_UNIQUE_INDEX(pg_pltemplate_name_index, 1137, on pg_pltemplate using btree(tmplname name_ops));
-#define PLTemplateNameIndexId  1137
-
-DECLARE_UNIQUE_INDEX(pg_proc_oid_index, 2690, on pg_proc using btree(oid oid_ops));
-#define ProcedureOidIndexId  2690
-DECLARE_UNIQUE_INDEX(pg_proc_proname_args_nsp_index, 2691, on pg_proc using btree(proname name_ops, proargtypes oidvector_ops, pronamespace oid_ops));
-#define ProcedureNameArgsNspIndexId  2691
-
-DECLARE_UNIQUE_INDEX(pg_rewrite_oid_index, 2692, on pg_rewrite using btree(oid oid_ops));
-#define RewriteOidIndexId  2692
-DECLARE_UNIQUE_INDEX(pg_rewrite_rel_rulename_index, 2693, on pg_rewrite using btree(ev_class oid_ops, rulename name_ops));
-#define RewriteRelRulenameIndexId  2693
-
-DECLARE_UNIQUE_INDEX(pg_sequence_seqrelid_index, 5002, on pg_sequence using btree(seqrelid oid_ops));
-#define SequenceRelidIndexId	5002
-
-DECLARE_INDEX(pg_shdepend_depender_index, 1232, on pg_shdepend using btree(dbid oid_ops, classid oid_ops, objid oid_ops, objsubid int4_ops));
-#define SharedDependDependerIndexId		1232
-DECLARE_INDEX(pg_shdepend_reference_index, 1233, on pg_shdepend using btree(refclassid oid_ops, refobjid oid_ops));
-#define SharedDependReferenceIndexId	1233
-
-DECLARE_UNIQUE_INDEX(pg_statistic_relid_att_inh_index, 2696, on pg_statistic using btree(starelid oid_ops, staattnum int2_ops, stainherit bool_ops));
-#define StatisticRelidAttnumInhIndexId	2696
-
-DECLARE_UNIQUE_INDEX(pg_tablespace_oid_index, 2697, on pg_tablespace using btree(oid oid_ops));
-#define TablespaceOidIndexId  2697
-DECLARE_UNIQUE_INDEX(pg_tablespace_spcname_index, 2698, on pg_tablespace using btree(spcname name_ops));
-#define TablespaceNameIndexId  2698
-
-DECLARE_UNIQUE_INDEX(pg_transform_oid_index, 3574, on pg_transform using btree(oid oid_ops));
-#define TransformOidIndexId 3574
-DECLARE_UNIQUE_INDEX(pg_transform_type_lang_index, 3575, on pg_transform using btree(trftype oid_ops, trflang oid_ops));
-#define TransformTypeLangIndexId  3575
-
-DECLARE_INDEX(pg_trigger_tgconstraint_index, 2699, on pg_trigger using btree(tgconstraint oid_ops));
-#define TriggerConstraintIndexId  2699
-DECLARE_UNIQUE_INDEX(pg_trigger_tgrelid_tgname_index, 2701, on pg_trigger using btree(tgrelid oid_ops, tgname name_ops));
-#define TriggerRelidNameIndexId  2701
-DECLARE_UNIQUE_INDEX(pg_trigger_oid_index, 2702, on pg_trigger using btree(oid oid_ops));
-#define TriggerOidIndexId  2702
-
-DECLARE_UNIQUE_INDEX(pg_event_trigger_evtname_index, 3467, on pg_event_trigger using btree(evtname name_ops));
-#define EventTriggerNameIndexId  3467
-DECLARE_UNIQUE_INDEX(pg_event_trigger_oid_index, 3468, on pg_event_trigger using btree(oid oid_ops));
-#define EventTriggerOidIndexId	3468
-
-DECLARE_UNIQUE_INDEX(pg_ts_config_cfgname_index, 3608, on pg_ts_config using btree(cfgname name_ops, cfgnamespace oid_ops));
-#define TSConfigNameNspIndexId	3608
-DECLARE_UNIQUE_INDEX(pg_ts_config_oid_index, 3712, on pg_ts_config using btree(oid oid_ops));
-#define TSConfigOidIndexId	3712
-
-DECLARE_UNIQUE_INDEX(pg_ts_config_map_index, 3609, on pg_ts_config_map using btree(mapcfg oid_ops, maptokentype int4_ops, mapseqno int4_ops));
-#define TSConfigMapIndexId	3609
-
-DECLARE_UNIQUE_INDEX(pg_ts_dict_dictname_index, 3604, on pg_ts_dict using btree(dictname name_ops, dictnamespace oid_ops));
-#define TSDictionaryNameNspIndexId	3604
-DECLARE_UNIQUE_INDEX(pg_ts_dict_oid_index, 3605, on pg_ts_dict using btree(oid oid_ops));
-#define TSDictionaryOidIndexId	3605
-
-DECLARE_UNIQUE_INDEX(pg_ts_parser_prsname_index, 3606, on pg_ts_parser using btree(prsname name_ops, prsnamespace oid_ops));
-#define TSParserNameNspIndexId	3606
-DECLARE_UNIQUE_INDEX(pg_ts_parser_oid_index, 3607, on pg_ts_parser using btree(oid oid_ops));
-#define TSParserOidIndexId	3607
-
-DECLARE_UNIQUE_INDEX(pg_ts_template_tmplname_index, 3766, on pg_ts_template using btree(tmplname name_ops, tmplnamespace oid_ops));
-#define TSTemplateNameNspIndexId	3766
-DECLARE_UNIQUE_INDEX(pg_ts_template_oid_index, 3767, on pg_ts_template using btree(oid oid_ops));
-#define TSTemplateOidIndexId	3767
-
-DECLARE_UNIQUE_INDEX(pg_type_oid_index, 2703, on pg_type using btree(oid oid_ops));
-#define TypeOidIndexId	2703
-DECLARE_UNIQUE_INDEX(pg_type_typname_nsp_index, 2704, on pg_type using btree(typname name_ops, typnamespace oid_ops));
-#define TypeNameNspIndexId	2704
-
-DECLARE_UNIQUE_INDEX(pg_foreign_data_wrapper_oid_index, 112, on pg_foreign_data_wrapper using btree(oid oid_ops));
-#define ForeignDataWrapperOidIndexId	112
-DECLARE_UNIQUE_INDEX(pg_foreign_data_wrapper_name_index, 548, on pg_foreign_data_wrapper using btree(fdwname name_ops));
-#define ForeignDataWrapperNameIndexId	548
-
-DECLARE_UNIQUE_INDEX(pg_foreign_server_oid_index, 113, on pg_foreign_server using btree(oid oid_ops));
-#define ForeignServerOidIndexId 113
-DECLARE_UNIQUE_INDEX(pg_foreign_server_name_index, 549, on pg_foreign_server using btree(srvname name_ops));
-#define ForeignServerNameIndexId	549
-
-DECLARE_UNIQUE_INDEX(pg_user_mapping_oid_index, 174, on pg_user_mapping using btree(oid oid_ops));
-#define UserMappingOidIndexId	174
-DECLARE_UNIQUE_INDEX(pg_user_mapping_user_server_index, 175, on pg_user_mapping using btree(umuser oid_ops, umserver oid_ops));
-#define UserMappingUserServerIndexId	175
-
-DECLARE_UNIQUE_INDEX(pg_foreign_table_relid_index, 3119, on pg_foreign_table using btree(ftrelid oid_ops));
-#define ForeignTableRelidIndexId 3119
-
-DECLARE_UNIQUE_INDEX(pg_default_acl_role_nsp_obj_index, 827, on pg_default_acl using btree(defaclrole oid_ops, defaclnamespace oid_ops, defaclobjtype char_ops));
-#define DefaultAclRoleNspObjIndexId 827
-DECLARE_UNIQUE_INDEX(pg_default_acl_oid_index, 828, on pg_default_acl using btree(oid oid_ops));
-#define DefaultAclOidIndexId	828
-
-DECLARE_UNIQUE_INDEX(pg_db_role_setting_databaseid_rol_index, 2965, on pg_db_role_setting using btree(setdatabase oid_ops, setrole oid_ops));
-#define DbRoleSettingDatidRolidIndexId	2965
-
-DECLARE_UNIQUE_INDEX(pg_seclabel_object_index, 3597, on pg_seclabel using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops, provider text_pattern_ops));
-#define SecLabelObjectIndexId				3597
-
-DECLARE_UNIQUE_INDEX(pg_shseclabel_object_index, 3593, on pg_shseclabel using btree(objoid oid_ops, classoid oid_ops, provider text_pattern_ops));
-#define SharedSecLabelObjectIndexId			3593
-
-DECLARE_UNIQUE_INDEX(pg_extension_oid_index, 3080, on pg_extension using btree(oid oid_ops));
-#define ExtensionOidIndexId 3080
-DECLARE_UNIQUE_INDEX(pg_extension_name_index, 3081, on pg_extension using btree(extname name_ops));
-#define ExtensionNameIndexId 3081
-
-DECLARE_UNIQUE_INDEX(pg_range_rngtypid_index, 3542, on pg_range using btree(rngtypid oid_ops));
-#define RangeTypidIndexId					3542
-
-DECLARE_UNIQUE_INDEX(pg_policy_oid_index, 3257, on pg_policy using btree(oid oid_ops));
-#define PolicyOidIndexId				3257
-
-DECLARE_UNIQUE_INDEX(pg_policy_polrelid_polname_index, 3258, on pg_policy using btree(polrelid oid_ops, polname name_ops));
-#define PolicyPolrelidPolnameIndexId				3258
-
-DECLARE_UNIQUE_INDEX(pg_replication_origin_roiident_index, 6001, on pg_replication_origin using btree(roident oid_ops));
-#define ReplicationOriginIdentIndex 6001
-
-DECLARE_UNIQUE_INDEX(pg_replication_origin_roname_index, 6002, on pg_replication_origin using btree(roname text_pattern_ops));
-#define ReplicationOriginNameIndex 6002
-
-DECLARE_UNIQUE_INDEX(pg_partitioned_table_partrelid_index, 3351, on pg_partitioned_table using btree(partrelid oid_ops));
-#define PartitionedRelidIndexId			 3351
-
-DECLARE_UNIQUE_INDEX(pg_publication_oid_index, 6110, on pg_publication using btree(oid oid_ops));
-#define PublicationObjectIndexId 6110
-
-DECLARE_UNIQUE_INDEX(pg_publication_pubname_index, 6111, on pg_publication using btree(pubname name_ops));
-#define PublicationNameIndexId 6111
-
-DECLARE_UNIQUE_INDEX(pg_publication_rel_oid_index, 6112, on pg_publication_rel using btree(oid oid_ops));
-#define PublicationRelObjectIndexId 6112
-
-DECLARE_UNIQUE_INDEX(pg_publication_rel_prrelid_prpubid_index, 6113, on pg_publication_rel using btree(prrelid oid_ops, prpubid oid_ops));
-#define PublicationRelPrrelidPrpubidIndexId 6113
-
-DECLARE_UNIQUE_INDEX(pg_subscription_oid_index, 6114, on pg_subscription using btree(oid oid_ops));
-#define SubscriptionObjectIndexId 6114
-
-DECLARE_UNIQUE_INDEX(pg_subscription_subname_index, 6115, on pg_subscription using btree(subdbid oid_ops, subname name_ops));
-#define SubscriptionNameIndexId 6115
-
-DECLARE_UNIQUE_INDEX(pg_subscription_rel_srrelid_srsubid_index, 6117, on pg_subscription_rel using btree(srrelid oid_ops, srsubid oid_ops));
-#define SubscriptionRelSrrelidSrsubidIndexId 6117
-
-/* last step of initialization script: build the indexes declared above */
-BUILD_INDICES
-
 #endif							/* INDEXING_H */
diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h
index c0c1469..5c8933c 100644
--- a/src/include/catalog/pg_aggregate.h
+++ b/src/include/catalog/pg_aggregate.h
@@ -81,6 +81,9 @@ CATALOG(pg_aggregate,2600) BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_aggregate;
 
+DECLARE_UNIQUE_INDEX(pg_aggregate_fnoid_index, 2650, on pg_aggregate using btree(aggfnoid oid_ops));
+#define AggregateFnoidIndexId  2650
+
 /* ----------------
  *		Form_pg_aggregate corresponds to a pointer to a tuple with
  *		the format of pg_aggregate relation.
diff --git a/src/include/catalog/pg_am.h b/src/include/catalog/pg_am.h
index b067ec1..505177d 100644
--- a/src/include/catalog/pg_am.h
+++ b/src/include/catalog/pg_am.h
@@ -36,6 +36,11 @@ CATALOG(pg_am,2601)
 	char		amtype;			/* see AMTYPE_xxx constants below */
 } FormData_pg_am;
 
+DECLARE_UNIQUE_INDEX(pg_am_name_index, 2651, on pg_am using btree(amname name_ops));
+#define AmNameIndexId  2651
+DECLARE_UNIQUE_INDEX(pg_am_oid_index, 2652, on pg_am using btree(oid oid_ops));
+#define AmOidIndexId  2652
+
 /* ----------------
  *		Form_pg_am corresponds to a pointer to a tuple with
  *		the format of pg_am relation.
diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h
index 247f067..79cce2e 100644
--- a/src/include/catalog/pg_amop.h
+++ b/src/include/catalog/pg_amop.h
@@ -80,6 +80,13 @@ CATALOG(pg_amop,2602)
 	regopf		amopsortfamily BKI_DEFAULT(0);
 } FormData_pg_amop;
 
+DECLARE_UNIQUE_INDEX(pg_amop_fam_strat_index, 2653, on pg_amop using btree(amopfamily oid_ops, amoplefttype oid_ops, amoprighttype oid_ops, amopstrategy int2_ops));
+#define AccessMethodStrategyIndexId  2653
+DECLARE_UNIQUE_INDEX(pg_amop_opr_fam_index, 2654, on pg_amop using btree(amopopr oid_ops, amoppurpose char_ops, amopfamily oid_ops));
+#define AccessMethodOperatorIndexId  2654
+DECLARE_UNIQUE_INDEX(pg_amop_oid_index, 2756, on pg_amop using btree(oid oid_ops));
+#define AccessMethodOperatorOidIndexId	2756
+
 /* allowed values of amoppurpose: */
 #define AMOP_SEARCH		's'		/* operator is for search */
 #define AMOP_ORDER		'o'		/* operator is for ordering */
diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h
index 17ed0e2..74d2ec0 100644
--- a/src/include/catalog/pg_amproc.h
+++ b/src/include/catalog/pg_amproc.h
@@ -60,6 +60,11 @@ CATALOG(pg_amproc,2603)
 	regproc		amproc;
 } FormData_pg_amproc;
 
+DECLARE_UNIQUE_INDEX(pg_amproc_fam_proc_index, 2655, on pg_amproc using btree(amprocfamily oid_ops, amproclefttype oid_ops, amprocrighttype oid_ops, amprocnum int2_ops));
+#define AccessMethodProcedureIndexId  2655
+DECLARE_UNIQUE_INDEX(pg_amproc_oid_index, 2757, on pg_amproc using btree(oid oid_ops));
+#define AccessMethodProcedureOidIndexId  2757
+
 /* ----------------
  *		Form_pg_amproc corresponds to a pointer to a tuple with
  *		the format of pg_amproc relation.
diff --git a/src/include/catalog/pg_attrdef.h b/src/include/catalog/pg_attrdef.h
index e4520e8..956325e 100644
--- a/src/include/catalog/pg_attrdef.h
+++ b/src/include/catalog/pg_attrdef.h
@@ -39,6 +39,13 @@ CATALOG(pg_attrdef,2604)
 #endif
 } FormData_pg_attrdef;
 
+DECLARE_TOAST(pg_attrdef, 2830, 2831);
+DECLARE_UNIQUE_INDEX(pg_attrdef_adrelid_adnum_index, 2656, on pg_attrdef using btree(adrelid oid_ops, adnum int2_ops));
+#define AttrDefaultIndexId	2656
+DECLARE_UNIQUE_INDEX(pg_attrdef_oid_index, 2657, on pg_attrdef using btree(oid oid_ops));
+#define AttrDefaultOidIndexId  2657
+
+
 /* ----------------
  *		Form_pg_attrdef corresponds to a pointer to a tuple with
  *		the format of pg_attrdef relation.
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index b13fc1a..ec0f10c 100644
--- a/src/include/catalog/pg_attribute.h
+++ b/src/include/catalog/pg_attribute.h
@@ -179,6 +179,11 @@ CATALOG(pg_attribute,1249) BKI_BOOTSTRAP BKI_WITHOUT_OIDS BKI_ROWTYPE_OID(75) BK
 #define ATTRIBUTE_FIXED_PART_SIZE \
 	(offsetof(FormData_pg_attribute,attcollation) + sizeof(Oid))
 
+DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnam_index, 2658, on pg_attribute using btree(attrelid oid_ops, attname name_ops));
+#define AttributeRelidNameIndexId  2658
+DECLARE_UNIQUE_INDEX(pg_attribute_relid_attnum_index, 2659, on pg_attribute using btree(attrelid oid_ops, attnum int2_ops));
+#define AttributeRelidNumIndexId  2659
+
 /* ----------------
  *		Form_pg_attribute corresponds to a pointer to a tuple with
  *		the format of pg_attribute relation.
diff --git a/src/include/catalog/pg_auth_members.h b/src/include/catalog/pg_auth_members.h
index 6b594ff..dfaa15b 100644
--- a/src/include/catalog/pg_auth_members.h
+++ b/src/include/catalog/pg_auth_members.h
@@ -37,6 +37,11 @@ CATALOG(pg_auth_members,1261) BKI_SHARED_RELATION BKI_WITHOUT_OIDS BKI_ROWTYPE_O
 	bool		admin_option;	/* granted with admin option? */
 } FormData_pg_auth_members;
 
+DECLARE_UNIQUE_INDEX(pg_auth_members_role_member_index, 2694, on pg_auth_members using btree(roleid oid_ops, member oid_ops));
+#define AuthMemRoleMemIndexId	2694
+DECLARE_UNIQUE_INDEX(pg_auth_members_member_role_index, 2695, on pg_auth_members using btree(member oid_ops, roleid oid_ops));
+#define AuthMemMemRoleIndexId	2695
+
 /* ----------------
  *		Form_pg_auth_members corresponds to a pointer to a tuple with
  *		the format of pg_auth_members relation.
diff --git a/src/include/catalog/pg_authid.h b/src/include/catalog/pg_authid.h
index d073f72..7f62cf2 100644
--- a/src/include/catalog/pg_authid.h
+++ b/src/include/catalog/pg_authid.h
@@ -85,6 +85,10 @@ CATALOG(pg_authid,1260) BKI_SHARED_RELATION BKI_ROWTYPE_OID(2842) BKI_SCHEMA_MAC
 
 #undef timestamptz
 
+DECLARE_UNIQUE_INDEX(pg_authid_rolname_index, 2676, on pg_authid using btree(rolname name_ops));
+#define AuthIdRolnameIndexId	2676
+DECLARE_UNIQUE_INDEX(pg_authid_oid_index, 2677, on pg_authid using btree(oid oid_ops));
+#define AuthIdOidIndexId	2677
 
 /* ----------------
  *		Form_pg_authid corresponds to a pointer to a tuple with
diff --git a/src/include/catalog/pg_cast.h b/src/include/catalog/pg_cast.h
index fbe9949..25ddaef 100644
--- a/src/include/catalog/pg_cast.h
+++ b/src/include/catalog/pg_cast.h
@@ -39,6 +39,11 @@ CATALOG(pg_cast,2605)
 	char		castmethod;		/* cast method */
 } FormData_pg_cast;
 
+DECLARE_UNIQUE_INDEX(pg_cast_oid_index, 2660, on pg_cast using btree(oid oid_ops));
+#define CastOidIndexId	2660
+DECLARE_UNIQUE_INDEX(pg_cast_source_target_index, 2661, on pg_cast using btree(castsource oid_ops, casttarget oid_ops));
+#define CastSourceTargetIndexId  2661
+
 typedef FormData_pg_cast *Form_pg_cast;
 
 /*
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 9ad6ca8..6078870 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -149,6 +149,13 @@ CATALOG(pg_class,1259) BKI_BOOTSTRAP BKI_ROWTYPE_OID(83) BKI_SCHEMA_MACRO
 #define CLASS_TUPLE_SIZE \
 	 (offsetof(FormData_pg_class,relminmxid) + sizeof(TransactionId))
 
+DECLARE_UNIQUE_INDEX(pg_class_oid_index, 2662, on pg_class using btree(oid oid_ops));
+#define ClassOidIndexId  2662
+DECLARE_UNIQUE_INDEX(pg_class_relname_nsp_index, 2663, on pg_class using btree(relname name_ops, relnamespace oid_ops));
+#define ClassNameNspIndexId  2663
+DECLARE_INDEX(pg_class_tblspc_relfilenode_index, 3455, on pg_class using btree(reltablespace oid_ops, relfilenode oid_ops));
+#define ClassTblspcRelfilenodeIndexId  3455
+
 /* ----------------
  *		Form_pg_class corresponds to a pointer to a tuple with
  *		the format of pg_class relation.
diff --git a/src/include/catalog/pg_collation.h b/src/include/catalog/pg_collation.h
index 98aaf30..7f099c1 100644
--- a/src/include/catalog/pg_collation.h
+++ b/src/include/catalog/pg_collation.h
@@ -45,6 +45,11 @@ CATALOG(pg_collation,3456)
 #endif
 } FormData_pg_collation;
 
+DECLARE_UNIQUE_INDEX(pg_collation_name_enc_nsp_index, 3164, on pg_collation using btree(collname name_ops, collencoding int4_ops, collnamespace oid_ops));
+#define CollationNameEncNspIndexId 3164
+DECLARE_UNIQUE_INDEX(pg_collation_oid_index, 3085, on pg_collation using btree(oid oid_ops));
+#define CollationOidIndexId  3085
+
 /* ----------------
  *		Form_pg_collation corresponds to a pointer to a row with
  *		the format of pg_collation relation.
diff --git a/src/include/catalog/pg_constraint.h b/src/include/catalog/pg_constraint.h
index 81ff01f..aa92eb1 100644
--- a/src/include/catalog/pg_constraint.h
+++ b/src/include/catalog/pg_constraint.h
@@ -139,6 +139,16 @@ CATALOG(pg_constraint,2606)
 #endif
 } FormData_pg_constraint;
 
+DECLARE_TOAST(pg_constraint, 2832, 2833);
+DECLARE_INDEX(pg_constraint_conname_nsp_index, 2664, on pg_constraint using btree(conname name_ops, connamespace oid_ops));
+#define ConstraintNameNspIndexId  2664
+DECLARE_INDEX(pg_constraint_conrelid_index, 2665, on pg_constraint using btree(conrelid oid_ops));
+#define ConstraintRelidIndexId	2665
+DECLARE_INDEX(pg_constraint_contypid_index, 2666, on pg_constraint using btree(contypid oid_ops));
+#define ConstraintTypidIndexId	2666
+DECLARE_UNIQUE_INDEX(pg_constraint_oid_index, 2667, on pg_constraint using btree(oid oid_ops));
+#define ConstraintOidIndexId  2667
+
 /* ----------------
  *		Form_pg_constraint corresponds to a pointer to a tuple with
  *		the format of pg_constraint relation.
diff --git a/src/include/catalog/pg_conversion.h b/src/include/catalog/pg_conversion.h
index 8e46b02..9e7f5ce 100644
--- a/src/include/catalog/pg_conversion.h
+++ b/src/include/catalog/pg_conversion.h
@@ -48,6 +48,13 @@ CATALOG(pg_conversion,2607)
 	bool		condefault;
 } FormData_pg_conversion;
 
+DECLARE_UNIQUE_INDEX(pg_conversion_default_index, 2668, on pg_conversion using btree(connamespace oid_ops, conforencoding int4_ops, contoencoding int4_ops, oid oid_ops));
+#define ConversionDefaultIndexId  2668
+DECLARE_UNIQUE_INDEX(pg_conversion_name_nsp_index, 2669, on pg_conversion using btree(conname name_ops, connamespace oid_ops));
+#define ConversionNameNspIndexId  2669
+DECLARE_UNIQUE_INDEX(pg_conversion_oid_index, 2670, on pg_conversion using btree(oid oid_ops));
+#define ConversionOidIndexId  2670
+
 /* ----------------
  *		Form_pg_conversion corresponds to a pointer to a tuple with
  *		the format of pg_conversion relation.
diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h
index 9617a8a..aa135e8 100644
--- a/src/include/catalog/pg_database.h
+++ b/src/include/catalog/pg_database.h
@@ -50,6 +50,11 @@ CATALOG(pg_database,1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_M
 #endif
 } FormData_pg_database;
 
+DECLARE_UNIQUE_INDEX(pg_database_datname_index, 2671, on pg_database using btree(datname name_ops));
+#define DatabaseNameIndexId  2671
+DECLARE_UNIQUE_INDEX(pg_database_oid_index, 2672, on pg_database using btree(oid oid_ops));
+#define DatabaseOidIndexId	2672
+
 /* ----------------
  *		Form_pg_database corresponds to a pointer to a tuple with
  *		the format of pg_database relation.
diff --git a/src/include/catalog/pg_db_role_setting.h b/src/include/catalog/pg_db_role_setting.h
index aa01494..5c2115a 100644
--- a/src/include/catalog/pg_db_role_setting.h
+++ b/src/include/catalog/pg_db_role_setting.h
@@ -39,6 +39,12 @@ CATALOG(pg_db_role_setting,2964) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_db_role_setting;
 
+DECLARE_TOAST(pg_db_role_setting, 2966, 2967);
+#define PgDbRoleSettingToastTable 2966
+#define PgDbRoleSettingToastIndex 2967
+DECLARE_UNIQUE_INDEX(pg_db_role_setting_databaseid_rol_index, 2965, on pg_db_role_setting using btree(setdatabase oid_ops, setrole oid_ops));
+#define DbRoleSettingDatidRolidIndexId	2965
+
 typedef FormData_pg_db_role_setting * Form_pg_db_role_setting;
 
 /* ----------------
diff --git a/src/include/catalog/pg_default_acl.h b/src/include/catalog/pg_default_acl.h
index ec84272..5950999 100644
--- a/src/include/catalog/pg_default_acl.h
+++ b/src/include/catalog/pg_default_acl.h
@@ -38,6 +38,11 @@ CATALOG(pg_default_acl,826)
 #endif
 } FormData_pg_default_acl;
 
+DECLARE_UNIQUE_INDEX(pg_default_acl_role_nsp_obj_index, 827, on pg_default_acl using btree(defaclrole oid_ops, defaclnamespace oid_ops, defaclobjtype char_ops));
+#define DefaultAclRoleNspObjIndexId 827
+DECLARE_UNIQUE_INDEX(pg_default_acl_oid_index, 828, on pg_default_acl using btree(oid oid_ops));
+#define DefaultAclOidIndexId	828
+
 /* ----------------
  *		Form_pg_default_acl corresponds to a pointer to a tuple with
  *		the format of pg_default_acl relation.
diff --git a/src/include/catalog/pg_depend.h b/src/include/catalog/pg_depend.h
index fdba9e3..e86a3a1 100644
--- a/src/include/catalog/pg_depend.h
+++ b/src/include/catalog/pg_depend.h
@@ -53,6 +53,11 @@ CATALOG(pg_depend,2608) BKI_WITHOUT_OIDS
 	char		deptype;		/* see codes in dependency.h */
 } FormData_pg_depend;
 
+DECLARE_INDEX(pg_depend_depender_index, 2673, on pg_depend using btree(classid oid_ops, objid oid_ops, objsubid int4_ops));
+#define DependDependerIndexId  2673
+DECLARE_INDEX(pg_depend_reference_index, 2674, on pg_depend using btree(refclassid oid_ops, refobjid oid_ops, refobjsubid int4_ops));
+#define DependReferenceIndexId	2674
+
 /* ----------------
  *		Form_pg_depend corresponds to a pointer to a row with
  *		the format of pg_depend relation.
diff --git a/src/include/catalog/pg_description.h b/src/include/catalog/pg_description.h
index 9ee1675..80bc11d 100644
--- a/src/include/catalog/pg_description.h
+++ b/src/include/catalog/pg_description.h
@@ -53,6 +53,10 @@ CATALOG(pg_description,2609) BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_description;
 
+DECLARE_TOAST(pg_description, 2834, 2835);
+DECLARE_UNIQUE_INDEX(pg_description_o_c_o_index, 2675, on pg_description using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops));
+#define DescriptionObjIndexId  2675
+
 /* ----------------
  *		Form_pg_description corresponds to a pointer to a tuple with
  *		the format of pg_description relation.
diff --git a/src/include/catalog/pg_enum.h b/src/include/catalog/pg_enum.h
index 4f696ad..0ff8f07 100644
--- a/src/include/catalog/pg_enum.h
+++ b/src/include/catalog/pg_enum.h
@@ -35,6 +35,13 @@ CATALOG(pg_enum,3501)
 	NameData	enumlabel;		/* text representation of enum value */
 } FormData_pg_enum;
 
+DECLARE_UNIQUE_INDEX(pg_enum_oid_index, 3502, on pg_enum using btree(oid oid_ops));
+#define EnumOidIndexId	3502
+DECLARE_UNIQUE_INDEX(pg_enum_typid_label_index, 3503, on pg_enum using btree(enumtypid oid_ops, enumlabel name_ops));
+#define EnumTypIdLabelIndexId 3503
+DECLARE_UNIQUE_INDEX(pg_enum_typid_sortorder_index, 3534, on pg_enum using btree(enumtypid oid_ops, enumsortorder float4_ops));
+#define EnumTypIdSortOrderIndexId 3534
+
 /* ----------------
  *		Form_pg_enum corresponds to a pointer to a tuple with
  *		the format of pg_enum relation.
diff --git a/src/include/catalog/pg_event_trigger.h b/src/include/catalog/pg_event_trigger.h
index ed47aa8..79efeae 100644
--- a/src/include/catalog/pg_event_trigger.h
+++ b/src/include/catalog/pg_event_trigger.h
@@ -42,6 +42,11 @@ CATALOG(pg_event_trigger,3466)
 #endif
 } FormData_pg_event_trigger;
 
+DECLARE_UNIQUE_INDEX(pg_event_trigger_evtname_index, 3467, on pg_event_trigger using btree(evtname name_ops));
+#define EventTriggerNameIndexId  3467
+DECLARE_UNIQUE_INDEX(pg_event_trigger_oid_index, 3468, on pg_event_trigger using btree(oid oid_ops));
+#define EventTriggerOidIndexId	3468
+
 /* ----------------
  *		Form_pg_event_trigger corresponds to a pointer to a tuple with
  *		the format of pg_event_trigger relation.
diff --git a/src/include/catalog/pg_extension.h b/src/include/catalog/pg_extension.h
index a616dda..1981033 100644
--- a/src/include/catalog/pg_extension.h
+++ b/src/include/catalog/pg_extension.h
@@ -43,6 +43,11 @@ CATALOG(pg_extension,3079)
 #endif
 } FormData_pg_extension;
 
+DECLARE_UNIQUE_INDEX(pg_extension_oid_index, 3080, on pg_extension using btree(oid oid_ops));
+#define ExtensionOidIndexId 3080
+DECLARE_UNIQUE_INDEX(pg_extension_name_index, 3081, on pg_extension using btree(extname name_ops));
+#define ExtensionNameIndexId 3081
+
 /* ----------------
  *		Form_pg_extension corresponds to a pointer to a tuple with
  *		the format of pg_extension relation.
diff --git a/src/include/catalog/pg_foreign_data_wrapper.h b/src/include/catalog/pg_foreign_data_wrapper.h
index caa6c91..23ad840 100644
--- a/src/include/catalog/pg_foreign_data_wrapper.h
+++ b/src/include/catalog/pg_foreign_data_wrapper.h
@@ -39,6 +39,11 @@ CATALOG(pg_foreign_data_wrapper,2328)
 #endif
 } FormData_pg_foreign_data_wrapper;
 
+DECLARE_UNIQUE_INDEX(pg_foreign_data_wrapper_oid_index, 112, on pg_foreign_data_wrapper using btree(oid oid_ops));
+#define ForeignDataWrapperOidIndexId	112
+DECLARE_UNIQUE_INDEX(pg_foreign_data_wrapper_name_index, 548, on pg_foreign_data_wrapper using btree(fdwname name_ops));
+#define ForeignDataWrapperNameIndexId	548
+
 /* ----------------
  *		Form_pg_fdw corresponds to a pointer to a tuple with
  *		the format of pg_fdw relation.
diff --git a/src/include/catalog/pg_foreign_server.h b/src/include/catalog/pg_foreign_server.h
index 9aeb646..542c3c4 100644
--- a/src/include/catalog/pg_foreign_server.h
+++ b/src/include/catalog/pg_foreign_server.h
@@ -40,6 +40,11 @@ CATALOG(pg_foreign_server,1417)
 #endif
 } FormData_pg_foreign_server;
 
+DECLARE_UNIQUE_INDEX(pg_foreign_server_oid_index, 113, on pg_foreign_server using btree(oid oid_ops));
+#define ForeignServerOidIndexId 113
+DECLARE_UNIQUE_INDEX(pg_foreign_server_name_index, 549, on pg_foreign_server using btree(srvname name_ops));
+#define ForeignServerNameIndexId	549
+
 /* ----------------
  *		Form_pg_foreign_server corresponds to a pointer to a tuple with
  *		the format of pg_foreign_server relation.
diff --git a/src/include/catalog/pg_foreign_table.h b/src/include/catalog/pg_foreign_table.h
index 341ad5e..ff2d97f 100644
--- a/src/include/catalog/pg_foreign_table.h
+++ b/src/include/catalog/pg_foreign_table.h
@@ -36,6 +36,9 @@ CATALOG(pg_foreign_table,3118) BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_foreign_table;
 
+DECLARE_UNIQUE_INDEX(pg_foreign_table_relid_index, 3119, on pg_foreign_table using btree(ftrelid oid_ops));
+#define ForeignTableRelidIndexId 3119
+
 /* ----------------
  *		Form_pg_foreign_table corresponds to a pointer to a tuple with
  *		the format of pg_foreign_table relation.
diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h
index db737a8..9b29538 100644
--- a/src/include/catalog/pg_index.h
+++ b/src/include/catalog/pg_index.h
@@ -59,6 +59,11 @@ CATALOG(pg_index,2610) BKI_WITHOUT_OIDS BKI_SCHEMA_MACRO
 #endif
 } FormData_pg_index;
 
+DECLARE_INDEX(pg_index_indrelid_index, 2678, on pg_index using btree(indrelid oid_ops));
+#define IndexIndrelidIndexId  2678
+DECLARE_UNIQUE_INDEX(pg_index_indexrelid_index, 2679, on pg_index using btree(indexrelid oid_ops));
+#define IndexRelidIndexId  2679
+
 /* ----------------
  *		Form_pg_index corresponds to a pointer to a tuple with
  *		the format of pg_index relation.
diff --git a/src/include/catalog/pg_inherits.h b/src/include/catalog/pg_inherits.h
index 334e738..0c53850 100644
--- a/src/include/catalog/pg_inherits.h
+++ b/src/include/catalog/pg_inherits.h
@@ -35,6 +35,11 @@ CATALOG(pg_inherits,2611) BKI_WITHOUT_OIDS
 	int32		inhseqno;
 } FormData_pg_inherits;
 
+DECLARE_UNIQUE_INDEX(pg_inherits_relid_seqno_index, 2680, on pg_inherits using btree(inhrelid oid_ops, inhseqno int4_ops));
+#define InheritsRelidSeqnoIndexId  2680
+DECLARE_INDEX(pg_inherits_parent_index, 2187, on pg_inherits using btree(inhparent oid_ops));
+#define InheritsParentIndexId  2187
+
 /* ----------------
  *		Form_pg_inherits corresponds to a pointer to a tuple with
  *		the format of pg_inherits relation.
diff --git a/src/include/catalog/pg_init_privs.h b/src/include/catalog/pg_init_privs.h
index 7dd9e5d..f725457 100644
--- a/src/include/catalog/pg_init_privs.h
+++ b/src/include/catalog/pg_init_privs.h
@@ -50,6 +50,9 @@ CATALOG(pg_init_privs,3394) BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_init_privs;
 
+DECLARE_UNIQUE_INDEX(pg_init_privs_o_c_o_index, 3395, on pg_init_privs using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops));
+#define InitPrivsObjIndexId  3395
+
 /* ----------------
  *		Form_pg_init_privs corresponds to a pointer to a tuple with
  *		the format of pg_init_privs relation.
diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h
index 02de79d..15a3d89 100644
--- a/src/include/catalog/pg_language.h
+++ b/src/include/catalog/pg_language.h
@@ -44,6 +44,11 @@ CATALOG(pg_language,2612)
 #endif
 } FormData_pg_language;
 
+DECLARE_UNIQUE_INDEX(pg_language_name_index, 2681, on pg_language using btree(lanname name_ops));
+#define LanguageNameIndexId  2681
+DECLARE_UNIQUE_INDEX(pg_language_oid_index, 2682, on pg_language using btree(oid oid_ops));
+#define LanguageOidIndexId	2682
+
 /* ----------------
  *		Form_pg_language corresponds to a pointer to a tuple with
  *		the format of pg_language relation.
diff --git a/src/include/catalog/pg_largeobject.h b/src/include/catalog/pg_largeobject.h
index 6c91656..ab56083 100644
--- a/src/include/catalog/pg_largeobject.h
+++ b/src/include/catalog/pg_largeobject.h
@@ -36,6 +36,9 @@ CATALOG(pg_largeobject,2613) BKI_WITHOUT_OIDS
 											 * zero-length) */
 } FormData_pg_largeobject;
 
+DECLARE_UNIQUE_INDEX(pg_largeobject_loid_pn_index, 2683, on pg_largeobject using btree(loid oid_ops, pageno int4_ops));
+#define LargeObjectLOidPNIndexId  2683
+
 /* ----------------
  *		Form_pg_largeobject corresponds to a pointer to a tuple with
  *		the format of pg_largeobject relation.
diff --git a/src/include/catalog/pg_largeobject_metadata.h b/src/include/catalog/pg_largeobject_metadata.h
index bb84d2d..7b7840e 100644
--- a/src/include/catalog/pg_largeobject_metadata.h
+++ b/src/include/catalog/pg_largeobject_metadata.h
@@ -37,6 +37,9 @@ CATALOG(pg_largeobject_metadata,2995)
 #endif
 } FormData_pg_largeobject_metadata;
 
+DECLARE_UNIQUE_INDEX(pg_largeobject_metadata_oid_index, 2996, on pg_largeobject_metadata using btree(oid oid_ops));
+#define LargeObjectMetadataOidIndexId	2996
+
 /* ----------------
  *		Form_pg_largeobject_metadata corresponds to a pointer to a tuple
  *		with the format of pg_largeobject_metadata relation.
diff --git a/src/include/catalog/pg_namespace.h b/src/include/catalog/pg_namespace.h
index c3a0737..525f340 100644
--- a/src/include/catalog/pg_namespace.h
+++ b/src/include/catalog/pg_namespace.h
@@ -44,6 +44,11 @@ CATALOG(pg_namespace,2615)
 #endif
 } FormData_pg_namespace;
 
+DECLARE_UNIQUE_INDEX(pg_namespace_nspname_index, 2684, on pg_namespace using btree(nspname name_ops));
+#define NamespaceNameIndexId  2684
+DECLARE_UNIQUE_INDEX(pg_namespace_oid_index, 2685, on pg_namespace using btree(oid oid_ops));
+#define NamespaceOidIndexId  2685
+
 /* ----------------
  *		Form_pg_namespace corresponds to a pointer to a tuple with
  *		the format of pg_namespace relation.
diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h
index c9ed806..31c9aeb 100644
--- a/src/include/catalog/pg_opclass.h
+++ b/src/include/catalog/pg_opclass.h
@@ -70,6 +70,11 @@ CATALOG(pg_opclass,2616)
 	regtype		opckeytype BKI_DEFAULT(0);
 } FormData_pg_opclass;
 
+DECLARE_UNIQUE_INDEX(pg_opclass_am_name_nsp_index, 2686, on pg_opclass using btree(opcmethod oid_ops, opcname name_ops, opcnamespace oid_ops));
+#define OpclassAmNameNspIndexId  2686
+DECLARE_UNIQUE_INDEX(pg_opclass_oid_index, 2687, on pg_opclass using btree(oid oid_ops));
+#define OpclassOidIndexId  2687
+
 /* ----------------
  *		Form_pg_opclass corresponds to a pointer to a tuple with
  *		the format of pg_opclass relation.
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index a099c9f..50cd840 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -75,6 +75,11 @@ CATALOG(pg_operator,2617)
 	regproc		oprjoin BKI_DEFAULT(-);
 } FormData_pg_operator;
 
+DECLARE_UNIQUE_INDEX(pg_operator_oid_index, 2688, on pg_operator using btree(oid oid_ops));
+#define OperatorOidIndexId	2688
+DECLARE_UNIQUE_INDEX(pg_operator_oprname_l_r_n_index, 2689, on pg_operator using btree(oprname name_ops, oprleft oid_ops, oprright oid_ops, oprnamespace oid_ops));
+#define OperatorNameNspIndexId	2689
+
 /* ----------------
  *		Form_pg_operator corresponds to a pointer to a tuple with
  *		the format of pg_operator relation.
diff --git a/src/include/catalog/pg_opfamily.h b/src/include/catalog/pg_opfamily.h
index ce3b07e..83af79a 100644
--- a/src/include/catalog/pg_opfamily.h
+++ b/src/include/catalog/pg_opfamily.h
@@ -41,6 +41,11 @@ CATALOG(pg_opfamily,2753)
 	Oid			opfowner BKI_DEFAULT(PGUID);
 } FormData_pg_opfamily;
 
+DECLARE_UNIQUE_INDEX(pg_opfamily_am_name_nsp_index, 2754, on pg_opfamily using btree(opfmethod oid_ops, opfname name_ops, opfnamespace oid_ops));
+#define OpfamilyAmNameNspIndexId  2754
+DECLARE_UNIQUE_INDEX(pg_opfamily_oid_index, 2755, on pg_opfamily using btree(oid oid_ops));
+#define OpfamilyOidIndexId	2755
+
 /* ----------------
  *		Form_pg_opfamily corresponds to a pointer to a tuple with
  *		the format of pg_opfamily relation.
diff --git a/src/include/catalog/pg_partitioned_table.h b/src/include/catalog/pg_partitioned_table.h
index 0958fbb..148d3ec 100644
--- a/src/include/catalog/pg_partitioned_table.h
+++ b/src/include/catalog/pg_partitioned_table.h
@@ -53,6 +53,9 @@ CATALOG(pg_partitioned_table,3350) BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_partitioned_table;
 
+DECLARE_UNIQUE_INDEX(pg_partitioned_table_partrelid_index, 3351, on pg_partitioned_table using btree(partrelid oid_ops));
+#define PartitionedRelidIndexId			 3351
+
 /* ----------------
  *		Form_pg_partitioned_table corresponds to a pointer to a tuple with
  *		the format of pg_partitioned_table relation.
diff --git a/src/include/catalog/pg_pltemplate.h b/src/include/catalog/pg_pltemplate.h
index 31dba12..ec28798 100644
--- a/src/include/catalog/pg_pltemplate.h
+++ b/src/include/catalog/pg_pltemplate.h
@@ -44,6 +44,9 @@ CATALOG(pg_pltemplate,1136) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_pltemplate;
 
+DECLARE_UNIQUE_INDEX(pg_pltemplate_name_index, 1137, on pg_pltemplate using btree(tmplname name_ops));
+#define PLTemplateNameIndexId  1137
+
 /* ----------------
  *		Form_pg_pltemplate corresponds to a pointer to a row with
  *		the format of pg_pltemplate relation.
diff --git a/src/include/catalog/pg_policy.h b/src/include/catalog/pg_policy.h
index 8600073..1bc8819 100644
--- a/src/include/catalog/pg_policy.h
+++ b/src/include/catalog/pg_policy.h
@@ -32,6 +32,11 @@ CATALOG(pg_policy,3256)
 #endif
 } FormData_pg_policy;
 
+DECLARE_UNIQUE_INDEX(pg_policy_oid_index, 3257, on pg_policy using btree(oid oid_ops));
+#define PolicyOidIndexId				3257
+DECLARE_UNIQUE_INDEX(pg_policy_polrelid_polname_index, 3258, on pg_policy using btree(polrelid oid_ops, polname name_ops));
+#define PolicyPolrelidPolnameIndexId				3258
+
 /* ----------------
  *		Form_pg_policy corresponds to a pointer to a row with
  *		the format of pg_policy relation.
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 1f71a6f..d764e79 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -126,6 +126,12 @@ CATALOG(pg_proc,1255) BKI_BOOTSTRAP BKI_ROWTYPE_OID(81) BKI_SCHEMA_MACRO
 #endif
 } FormData_pg_proc;
 
+DECLARE_TOAST(pg_proc, 2836, 2837);
+DECLARE_UNIQUE_INDEX(pg_proc_oid_index, 2690, on pg_proc using btree(oid oid_ops));
+#define ProcedureOidIndexId  2690
+DECLARE_UNIQUE_INDEX(pg_proc_proname_args_nsp_index, 2691, on pg_proc using btree(proname name_ops, proargtypes oidvector_ops, pronamespace oid_ops));
+#define ProcedureNameArgsNspIndexId  2691
+
 /* ----------------
  *		Form_pg_proc corresponds to a pointer to a tuple with
  *		the format of pg_proc relation.
diff --git a/src/include/catalog/pg_publication.h b/src/include/catalog/pg_publication.h
index ff26a32..bf4c59b 100644
--- a/src/include/catalog/pg_publication.h
+++ b/src/include/catalog/pg_publication.h
@@ -51,6 +51,13 @@ CATALOG(pg_publication,6104)
 
 } FormData_pg_publication;
 
+DECLARE_UNIQUE_INDEX(pg_publication_oid_index, 6110, on pg_publication using btree(oid oid_ops));
+#define PublicationObjectIndexId 6110
+DECLARE_UNIQUE_INDEX(pg_publication_pubname_index, 6111, on pg_publication using btree(pubname name_ops));
+#define PublicationNameIndexId 6111
+DECLARE_UNIQUE_INDEX(pg_publication_rel_oid_index, 6112, on pg_publication_rel using btree(oid oid_ops));
+#define PublicationRelObjectIndexId 6112
+
 /* ----------------
  *		Form_pg_publication corresponds to a pointer to a tuple with
  *		the format of pg_publication relation.
diff --git a/src/include/catalog/pg_publication_rel.h b/src/include/catalog/pg_publication_rel.h
index f9f2288..cb2f5b9 100644
--- a/src/include/catalog/pg_publication_rel.h
+++ b/src/include/catalog/pg_publication_rel.h
@@ -33,6 +33,9 @@ CATALOG(pg_publication_rel,6106)
 	Oid			prrelid;		/* Oid of the relation */
 } FormData_pg_publication_rel;
 
+DECLARE_UNIQUE_INDEX(pg_publication_rel_prrelid_prpubid_index, 6113, on pg_publication_rel using btree(prrelid oid_ops, prpubid oid_ops));
+#define PublicationRelPrrelidPrpubidIndexId 6113
+
 /* ----------------
  *		Form_pg_publication_rel corresponds to a pointer to a tuple with
  *		the format of pg_publication_rel relation.
diff --git a/src/include/catalog/pg_range.h b/src/include/catalog/pg_range.h
index e0bf704..690ebc9 100644
--- a/src/include/catalog/pg_range.h
+++ b/src/include/catalog/pg_range.h
@@ -38,6 +38,9 @@ CATALOG(pg_range,3541) BKI_WITHOUT_OIDS
 	regproc		rngsubdiff;		/* subtype difference as a float8, or 0 */
 } FormData_pg_range;
 
+DECLARE_UNIQUE_INDEX(pg_range_rngtypid_index, 3542, on pg_range using btree(rngtypid oid_ops));
+#define RangeTypidIndexId					3542
+
 /* ----------------
  *		Form_pg_range corresponds to a pointer to a tuple with
  *		the format of pg_range relation.
diff --git a/src/include/catalog/pg_replication_origin.h b/src/include/catalog/pg_replication_origin.h
index 0b8c8b2..3070af2 100644
--- a/src/include/catalog/pg_replication_origin.h
+++ b/src/include/catalog/pg_replication_origin.h
@@ -52,6 +52,11 @@ CATALOG(pg_replication_origin,6000) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_replication_origin;
 
+DECLARE_UNIQUE_INDEX(pg_replication_origin_roiident_index, 6001, on pg_replication_origin using btree(roident oid_ops));
+#define ReplicationOriginIdentIndex 6001
+DECLARE_UNIQUE_INDEX(pg_replication_origin_roname_index, 6002, on pg_replication_origin using btree(roname text_pattern_ops));
+#define ReplicationOriginNameIndex 6002
+
 typedef FormData_pg_replication_origin *Form_pg_replication_origin;
 
 /* ----------------
diff --git a/src/include/catalog/pg_rewrite.h b/src/include/catalog/pg_rewrite.h
index ef7e8de..cc68f40 100644
--- a/src/include/catalog/pg_rewrite.h
+++ b/src/include/catalog/pg_rewrite.h
@@ -45,6 +45,12 @@ CATALOG(pg_rewrite,2618)
 #endif
 } FormData_pg_rewrite;
 
+DECLARE_TOAST(pg_rewrite, 2838, 2839);
+DECLARE_UNIQUE_INDEX(pg_rewrite_oid_index, 2692, on pg_rewrite using btree(oid oid_ops));
+#define RewriteOidIndexId  2692
+DECLARE_UNIQUE_INDEX(pg_rewrite_rel_rulename_index, 2693, on pg_rewrite using btree(ev_class oid_ops, rulename name_ops));
+#define RewriteRelRulenameIndexId  2693
+
 /* ----------------
  *		Form_pg_rewrite corresponds to a pointer to a tuple with
  *		the format of pg_rewrite relation.
diff --git a/src/include/catalog/pg_seclabel.h b/src/include/catalog/pg_seclabel.h
index 3db9612..812a6bc 100644
--- a/src/include/catalog/pg_seclabel.h
+++ b/src/include/catalog/pg_seclabel.h
@@ -32,6 +32,10 @@ CATALOG(pg_seclabel,3596) BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_seclabel;
 
+DECLARE_TOAST(pg_seclabel, 3598, 3599);
+DECLARE_UNIQUE_INDEX(pg_seclabel_object_index, 3597, on pg_seclabel using btree(objoid oid_ops, classoid oid_ops, objsubid int4_ops, provider text_pattern_ops));
+#define SecLabelObjectIndexId				3597
+
 /* ----------------
  *		compiler constants for pg_seclabel
  * ----------------
diff --git a/src/include/catalog/pg_sequence.h b/src/include/catalog/pg_sequence.h
index 6de54bb..3a22633 100644
--- a/src/include/catalog/pg_sequence.h
+++ b/src/include/catalog/pg_sequence.h
@@ -27,6 +27,9 @@ CATALOG(pg_sequence,2224) BKI_WITHOUT_OIDS
 	bool		seqcycle;
 } FormData_pg_sequence;
 
+DECLARE_UNIQUE_INDEX(pg_sequence_seqrelid_index, 5002, on pg_sequence using btree(seqrelid oid_ops));
+#define SequenceRelidIndexId	5002
+
 typedef FormData_pg_sequence *Form_pg_sequence;
 
 #define Natts_pg_sequence				8
diff --git a/src/include/catalog/pg_shdepend.h b/src/include/catalog/pg_shdepend.h
index 8a08914..5c89bfa 100644
--- a/src/include/catalog/pg_shdepend.h
+++ b/src/include/catalog/pg_shdepend.h
@@ -56,6 +56,11 @@ CATALOG(pg_shdepend,1214) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 	char		deptype;		/* see codes in dependency.h */
 } FormData_pg_shdepend;
 
+DECLARE_INDEX(pg_shdepend_depender_index, 1232, on pg_shdepend using btree(dbid oid_ops, classid oid_ops, objid oid_ops, objsubid int4_ops));
+#define SharedDependDependerIndexId		1232
+DECLARE_INDEX(pg_shdepend_reference_index, 1233, on pg_shdepend using btree(refclassid oid_ops, refobjid oid_ops));
+#define SharedDependReferenceIndexId	1233
+
 /* ----------------
  *		Form_pg_shdepend corresponds to a pointer to a row with
  *		the format of pg_shdepend relation.
diff --git a/src/include/catalog/pg_shdescription.h b/src/include/catalog/pg_shdescription.h
index 3afdb32..3772771 100644
--- a/src/include/catalog/pg_shdescription.h
+++ b/src/include/catalog/pg_shdescription.h
@@ -45,6 +45,12 @@ CATALOG(pg_shdescription,2396) BKI_SHARED_RELATION BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_shdescription;
 
+DECLARE_TOAST(pg_shdescription, 2846, 2847);
+#define PgShdescriptionToastTable 2846
+#define PgShdescriptionToastIndex 2847
+DECLARE_UNIQUE_INDEX(pg_shdescription_o_c_index, 2397, on pg_shdescription using btree(objoid oid_ops, classoid oid_ops));
+#define SharedDescriptionObjIndexId 2397
+
 /* ----------------
  *		Form_pg_shdescription corresponds to a pointer to a tuple with
  *		the format of pg_shdescription relation.
diff --git a/src/include/catalog/pg_shseclabel.h b/src/include/catalog/pg_shseclabel.h
index f8a906b..bedc852 100644
--- a/src/include/catalog/pg_shseclabel.h
+++ b/src/include/catalog/pg_shseclabel.h
@@ -32,6 +32,12 @@ CATALOG(pg_shseclabel,3592) BKI_SHARED_RELATION BKI_ROWTYPE_OID(4066) BKI_WITHOU
 #endif
 } FormData_pg_shseclabel;
 
+DECLARE_TOAST(pg_shseclabel, 4060, 4061);
+#define PgShseclabelToastTable 4060
+#define PgShseclabelToastIndex 4061
+DECLARE_UNIQUE_INDEX(pg_shseclabel_object_index, 3593, on pg_shseclabel using btree(objoid oid_ops, classoid oid_ops, provider text_pattern_ops));
+#define SharedSecLabelObjectIndexId			3593
+
 typedef FormData_pg_shseclabel * Form_pg_shseclabel;
 
 /* ----------------
diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h
index 74d38ca..da3a937 100644
--- a/src/include/catalog/pg_statistic.h
+++ b/src/include/catalog/pg_statistic.h
@@ -118,9 +118,12 @@ CATALOG(pg_statistic,2619) BKI_WITHOUT_OIDS
 #endif
 } FormData_pg_statistic;
 
+DECLARE_TOAST(pg_statistic, 2840, 2841);
+DECLARE_UNIQUE_INDEX(pg_statistic_relid_att_inh_index, 2696, on pg_statistic using btree(starelid oid_ops, staattnum int2_ops, stainherit bool_ops));
+#define StatisticRelidAttnumInhIndexId	2696
+
 #define STATISTIC_NUM_SLOTS  5
 
-
 /* ----------------
  *		Form_pg_statistic corresponds to a pointer to a tuple with
  *		the format of pg_statistic relation.
diff --git a/src/include/catalog/pg_statistic_ext.h b/src/include/catalog/pg_statistic_ext.h
index 4ed38c1..4ea7efc 100644
--- a/src/include/catalog/pg_statistic_ext.h
+++ b/src/include/catalog/pg_statistic_ext.h
@@ -53,6 +53,14 @@ CATALOG(pg_statistic_ext,3381)
 
 } FormData_pg_statistic_ext;
 
+DECLARE_TOAST(pg_statistic_ext, 3439, 3440);
+DECLARE_UNIQUE_INDEX(pg_statistic_ext_oid_index, 3380, on pg_statistic_ext using btree(oid oid_ops));
+#define StatisticExtOidIndexId	3380
+DECLARE_UNIQUE_INDEX(pg_statistic_ext_name_index, 3997, on pg_statistic_ext using btree(stxname name_ops, stxnamespace oid_ops));
+#define StatisticExtNameIndexId 3997
+DECLARE_INDEX(pg_statistic_ext_relid_index, 3379, on pg_statistic_ext using btree(stxrelid oid_ops));
+#define StatisticExtRelidIndexId 3379
+
 /* ----------------
  *		Form_pg_statistic_ext corresponds to a pointer to a tuple with
  *		the format of pg_statistic_ext relation.
diff --git a/src/include/catalog/pg_subscription.h b/src/include/catalog/pg_subscription.h
index 274ff6b..865cd3e 100644
--- a/src/include/catalog/pg_subscription.h
+++ b/src/include/catalog/pg_subscription.h
@@ -55,6 +55,11 @@ CATALOG(pg_subscription,6100) BKI_SHARED_RELATION BKI_ROWTYPE_OID(6101) BKI_SCHE
 #endif
 } FormData_pg_subscription;
 
+DECLARE_UNIQUE_INDEX(pg_subscription_oid_index, 6114, on pg_subscription using btree(oid oid_ops));
+#define SubscriptionObjectIndexId 6114
+DECLARE_UNIQUE_INDEX(pg_subscription_subname_index, 6115, on pg_subscription using btree(subdbid oid_ops, subname name_ops));
+#define SubscriptionNameIndexId 6115
+
 typedef FormData_pg_subscription *Form_pg_subscription;
 
 /* ----------------
diff --git a/src/include/catalog/pg_subscription_rel.h b/src/include/catalog/pg_subscription_rel.h
index 5748297..c8ccf0b 100644
--- a/src/include/catalog/pg_subscription_rel.h
+++ b/src/include/catalog/pg_subscription_rel.h
@@ -32,6 +32,9 @@ CATALOG(pg_subscription_rel,6102) BKI_WITHOUT_OIDS
 								 * synchronization coordination */
 } FormData_pg_subscription_rel;
 
+DECLARE_UNIQUE_INDEX(pg_subscription_rel_srrelid_srsubid_index, 6117, on pg_subscription_rel using btree(srrelid oid_ops, srsubid oid_ops));
+#define SubscriptionRelSrrelidSrsubidIndexId 6117
+
 typedef FormData_pg_subscription_rel *Form_pg_subscription_rel;
 
 /* ----------------
diff --git a/src/include/catalog/pg_tablespace.h b/src/include/catalog/pg_tablespace.h
index 0cf894a..10d21f9 100644
--- a/src/include/catalog/pg_tablespace.h
+++ b/src/include/catalog/pg_tablespace.h
@@ -40,6 +40,11 @@ CATALOG(pg_tablespace,1213) BKI_SHARED_RELATION
 #endif
 } FormData_pg_tablespace;
 
+DECLARE_UNIQUE_INDEX(pg_tablespace_oid_index, 2697, on pg_tablespace using btree(oid oid_ops));
+#define TablespaceOidIndexId  2697
+DECLARE_UNIQUE_INDEX(pg_tablespace_spcname_index, 2698, on pg_tablespace using btree(spcname name_ops));
+#define TablespaceNameIndexId  2698
+
 /* ----------------
  *		Form_pg_tablespace corresponds to a pointer to a tuple with
  *		the format of pg_tablespace relation.
diff --git a/src/include/catalog/pg_transform.h b/src/include/catalog/pg_transform.h
index 51b51b5..3802ed8 100644
--- a/src/include/catalog/pg_transform.h
+++ b/src/include/catalog/pg_transform.h
@@ -32,6 +32,11 @@ CATALOG(pg_transform,3576)
 	regproc		trftosql;
 } FormData_pg_transform;
 
+DECLARE_UNIQUE_INDEX(pg_transform_oid_index, 3574, on pg_transform using btree(oid oid_ops));
+#define TransformOidIndexId 3574
+DECLARE_UNIQUE_INDEX(pg_transform_type_lang_index, 3575, on pg_transform using btree(trftype oid_ops, trflang oid_ops));
+#define TransformTypeLangIndexId  3575
+
 typedef FormData_pg_transform *Form_pg_transform;
 
 /* ----------------
diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h
index 41e2aea..51e9257 100644
--- a/src/include/catalog/pg_trigger.h
+++ b/src/include/catalog/pg_trigger.h
@@ -64,6 +64,14 @@ CATALOG(pg_trigger,2620)
 #endif
 } FormData_pg_trigger;
 
+DECLARE_TOAST(pg_trigger, 2336, 2337);
+DECLARE_INDEX(pg_trigger_tgconstraint_index, 2699, on pg_trigger using btree(tgconstraint oid_ops));
+#define TriggerConstraintIndexId  2699
+DECLARE_UNIQUE_INDEX(pg_trigger_tgrelid_tgname_index, 2701, on pg_trigger using btree(tgrelid oid_ops, tgname name_ops));
+#define TriggerRelidNameIndexId  2701
+DECLARE_UNIQUE_INDEX(pg_trigger_oid_index, 2702, on pg_trigger using btree(oid oid_ops));
+#define TriggerOidIndexId  2702
+
 /* ----------------
  *		Form_pg_trigger corresponds to a pointer to a tuple with
  *		the format of pg_trigger relation.
diff --git a/src/include/catalog/pg_ts_config.h b/src/include/catalog/pg_ts_config.h
index b2b3941..26a5007 100644
--- a/src/include/catalog/pg_ts_config.h
+++ b/src/include/catalog/pg_ts_config.h
@@ -35,6 +35,11 @@ CATALOG(pg_ts_config,3602)
 	Oid			cfgparser;		/* OID of parser (in pg_ts_parser) */
 } FormData_pg_ts_config;
 
+DECLARE_UNIQUE_INDEX(pg_ts_config_cfgname_index, 3608, on pg_ts_config using btree(cfgname name_ops, cfgnamespace oid_ops));
+#define TSConfigNameNspIndexId	3608
+DECLARE_UNIQUE_INDEX(pg_ts_config_oid_index, 3712, on pg_ts_config using btree(oid oid_ops));
+#define TSConfigOidIndexId	3712
+
 typedef FormData_pg_ts_config *Form_pg_ts_config;
 
 /* ----------------
diff --git a/src/include/catalog/pg_ts_config_map.h b/src/include/catalog/pg_ts_config_map.h
index 86fd163..e521727 100644
--- a/src/include/catalog/pg_ts_config_map.h
+++ b/src/include/catalog/pg_ts_config_map.h
@@ -35,6 +35,9 @@ CATALOG(pg_ts_config_map,3603) BKI_WITHOUT_OIDS
 	Oid			mapdict;		/* dictionary to consult */
 } FormData_pg_ts_config_map;
 
+DECLARE_UNIQUE_INDEX(pg_ts_config_map_index, 3609, on pg_ts_config_map using btree(mapcfg oid_ops, maptokentype int4_ops, mapseqno int4_ops));
+#define TSConfigMapIndexId	3609
+
 typedef FormData_pg_ts_config_map *Form_pg_ts_config_map;
 
 /* ----------------
diff --git a/src/include/catalog/pg_ts_dict.h b/src/include/catalog/pg_ts_dict.h
index f465df0..538eaf9 100644
--- a/src/include/catalog/pg_ts_dict.h
+++ b/src/include/catalog/pg_ts_dict.h
@@ -39,6 +39,11 @@ CATALOG(pg_ts_dict,3600)
 #endif
 } FormData_pg_ts_dict;
 
+DECLARE_UNIQUE_INDEX(pg_ts_dict_dictname_index, 3604, on pg_ts_dict using btree(dictname name_ops, dictnamespace oid_ops));
+#define TSDictionaryNameNspIndexId	3604
+DECLARE_UNIQUE_INDEX(pg_ts_dict_oid_index, 3605, on pg_ts_dict using btree(oid oid_ops));
+#define TSDictionaryOidIndexId	3605
+
 typedef FormData_pg_ts_dict *Form_pg_ts_dict;
 
 /* ----------------
diff --git a/src/include/catalog/pg_ts_parser.h b/src/include/catalog/pg_ts_parser.h
index 5f26ea1..313d355 100644
--- a/src/include/catalog/pg_ts_parser.h
+++ b/src/include/catalog/pg_ts_parser.h
@@ -38,6 +38,11 @@ CATALOG(pg_ts_parser,3601)
 	regproc		prslextype;		/* return descriptions of lexeme's types */
 } FormData_pg_ts_parser;
 
+DECLARE_UNIQUE_INDEX(pg_ts_parser_prsname_index, 3606, on pg_ts_parser using btree(prsname name_ops, prsnamespace oid_ops));
+#define TSParserNameNspIndexId	3606
+DECLARE_UNIQUE_INDEX(pg_ts_parser_oid_index, 3607, on pg_ts_parser using btree(oid oid_ops));
+#define TSParserOidIndexId	3607
+
 typedef FormData_pg_ts_parser *Form_pg_ts_parser;
 
 /* ----------------
diff --git a/src/include/catalog/pg_ts_template.h b/src/include/catalog/pg_ts_template.h
index 5678f1a..97f68b0 100644
--- a/src/include/catalog/pg_ts_template.h
+++ b/src/include/catalog/pg_ts_template.h
@@ -35,6 +35,11 @@ CATALOG(pg_ts_template,3764)
 	regproc		tmpllexize;		/* base method of dictionary */
 } FormData_pg_ts_template;
 
+DECLARE_UNIQUE_INDEX(pg_ts_template_tmplname_index, 3766, on pg_ts_template using btree(tmplname name_ops, tmplnamespace oid_ops));
+#define TSTemplateNameNspIndexId	3766
+DECLARE_UNIQUE_INDEX(pg_ts_template_oid_index, 3767, on pg_ts_template using btree(oid oid_ops));
+#define TSTemplateOidIndexId	3767
+
 typedef FormData_pg_ts_template *Form_pg_ts_template;
 
 /* ----------------
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 3c069d5..7c7ad19 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -233,6 +233,11 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
 #endif
 } FormData_pg_type;
 
+DECLARE_UNIQUE_INDEX(pg_type_oid_index, 2703, on pg_type using btree(oid oid_ops));
+#define TypeOidIndexId	2703
+DECLARE_UNIQUE_INDEX(pg_type_typname_nsp_index, 2704, on pg_type using btree(typname name_ops, typnamespace oid_ops));
+#define TypeNameNspIndexId	2704
+
 /* ----------------
  *		Form_pg_type corresponds to a pointer to a row with
  *		the format of pg_type relation.
diff --git a/src/include/catalog/pg_user_mapping.h b/src/include/catalog/pg_user_mapping.h
index 78856ba..654c722 100644
--- a/src/include/catalog/pg_user_mapping.h
+++ b/src/include/catalog/pg_user_mapping.h
@@ -37,6 +37,11 @@ CATALOG(pg_user_mapping,1418)
 #endif
 } FormData_pg_user_mapping;
 
+DECLARE_UNIQUE_INDEX(pg_user_mapping_oid_index, 174, on pg_user_mapping using btree(oid oid_ops));
+#define UserMappingOidIndexId	174
+DECLARE_UNIQUE_INDEX(pg_user_mapping_user_server_index, 175, on pg_user_mapping using btree(umuser oid_ops, umserver oid_ops));
+#define UserMappingUserServerIndexId	175
+
 /* ----------------
  *		Form_pg_user_mapping corresponds to a pointer to a tuple with
  *		the format of pg_user_mapping relation.
diff --git a/src/include/catalog/toasting.h b/src/include/catalog/toasting.h
index ccc6416..25fd7d1 100644
--- a/src/include/catalog/toasting.h
+++ b/src/include/catalog/toasting.h
@@ -27,44 +27,4 @@ extern void AlterTableCreateToastTable(Oid relOid, Datum reloptions,
 extern void BootstrapToastTable(char *relName,
 					Oid toastOid, Oid toastIndexOid);
 
-
-/*
- * This macro is just to keep the C compiler from spitting up on the
- * upcoming commands for Catalog.pm.
- */
-#define DECLARE_TOAST(name,toastoid,indexoid) extern int no_such_variable
-
-
-/*
- * What follows are lines processed by genbki.pl to create the statements
- * the bootstrap parser will turn into BootstrapToastTable commands.
- * Each line specifies the system catalog that needs a toast table,
- * the OID to assign to the toast table, and the OID to assign to the
- * toast table's index.  The reason we hard-wire these OIDs is that we
- * need stable OIDs for shared relations, and that includes toast tables
- * of shared relations.
- */
-
-/* normal catalogs */
-DECLARE_TOAST(pg_attrdef, 2830, 2831);
-DECLARE_TOAST(pg_constraint, 2832, 2833);
-DECLARE_TOAST(pg_description, 2834, 2835);
-DECLARE_TOAST(pg_proc, 2836, 2837);
-DECLARE_TOAST(pg_rewrite, 2838, 2839);
-DECLARE_TOAST(pg_seclabel, 3598, 3599);
-DECLARE_TOAST(pg_statistic, 2840, 2841);
-DECLARE_TOAST(pg_statistic_ext, 3439, 3440);
-DECLARE_TOAST(pg_trigger, 2336, 2337);
-
-/* shared catalogs */
-DECLARE_TOAST(pg_shdescription, 2846, 2847);
-#define PgShdescriptionToastTable 2846
-#define PgShdescriptionToastIndex 2847
-DECLARE_TOAST(pg_db_role_setting, 2966, 2967);
-#define PgDbRoleSettingToastTable 2966
-#define PgDbRoleSettingToastIndex 2967
-DECLARE_TOAST(pg_shseclabel, 4060, 4061);
-#define PgShseclabelToastTable 4060
-#define PgShseclabelToastIndex 4061
-
 #endif							/* TOASTING_H */
diff --git a/src/include/catalog/unused_oids b/src/include/catalog/unused_oids
index a930560..0cfc319 100755
--- a/src/include/catalog/unused_oids
+++ b/src/include/catalog/unused_oids
@@ -27,7 +27,7 @@ export FIRSTOBJECTID
 # note: we exclude BKI_BOOTSTRAP relations since they are expected to have
 # matching data lines in pg_class.dat and pg_type.dat
 
-cat pg_*.h pg_*.dat toasting.h indexing.h |
+cat pg_*.h pg_*.dat |
 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' \
-- 
2.7.4

