]> granicus.if.org Git - postgresql/commitdiff
It turns out that the relcache thinks it can distinguish different
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Jun 2001 18:59:31 +0000 (18:59 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 Jun 2001 18:59:31 +0000 (18:59 +0000)
rules and triggers by OID.  So, even though we have no cross-references
in the system catalogs to pg_rewrite.oid or pg_trigger.oid, we'd better
have unique indexes on them.  Put back pg_rewrite_oid_index, which I
mistakenly removed a few days ago, and add pg_trigger_oid_index.

src/backend/catalog/indexing.c
src/include/catalog/catversion.h
src/include/catalog/indexing.h

index a9e6322580092c4a992f7d5163874799cc918064..96d3085f7a63746a37102de80944315f7905534d 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.78 2001/06/12 05:55:49 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.79 2001/06/16 18:59:31 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -66,13 +66,13 @@ char           *Name_pg_proc_indices[Num_pg_proc_indices] =
 char      *Name_pg_relcheck_indices[Num_pg_relcheck_indices] =
 {RelCheckIndex};
 char      *Name_pg_rewrite_indices[Num_pg_rewrite_indices] =
-{RewriteRulenameIndex};
+{RewriteOidIndex, RewriteRulenameIndex};
 char      *Name_pg_shadow_indices[Num_pg_shadow_indices] =
 {ShadowNameIndex, ShadowSysidIndex};
 char      *Name_pg_statistic_indices[Num_pg_statistic_indices] =
 {StatisticRelidAttnumIndex};
 char      *Name_pg_trigger_indices[Num_pg_trigger_indices] =
-{TriggerRelidIndex, TriggerConstrNameIndex, TriggerConstrRelidIndex};
+{TriggerRelidIndex, TriggerConstrNameIndex, TriggerConstrRelidIndex, TriggerOidIndex};
 char      *Name_pg_type_indices[Num_pg_type_indices] =
 {TypeNameIndex, TypeOidIndex};
 char      *Name_pg_description_indices[Num_pg_description_indices] =
index 6fcd0f1c1ccbecbef2a5e076111e54a52b92b984..91feaec19e274167c781b8538399f12350393096 100644 (file)
@@ -37,7 +37,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: catversion.h,v 1.82 2001/06/12 05:55:50 tgl Exp $
+ * $Id: catversion.h,v 1.83 2001/06/16 18:59:31 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -53,6 +53,6 @@
  */
 
 /*                                                     yyyymmddN */
-#define CATALOG_VERSION_NO     200106111
+#define CATALOG_VERSION_NO     200106161
 
 #endif
index 496ba4eaa3cc7471be0b2e48b19653ab9478666a..50e4d14a8f95135610341940cfdf55bb4faebf2e 100644 (file)
@@ -8,7 +8,7 @@
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: indexing.h,v 1.50 2001/06/12 05:55:50 tgl Exp $
+ * $Id: indexing.h,v 1.51 2001/06/16 18:59:31 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
 #define Num_pg_operator_indices                2
 #define Num_pg_proc_indices                    2
 #define Num_pg_relcheck_indices                1
-#define Num_pg_rewrite_indices         1
+#define Num_pg_rewrite_indices         2
 #define Num_pg_shadow_indices          2
 #define Num_pg_statistic_indices       1
-#define Num_pg_trigger_indices         3
+#define Num_pg_trigger_indices         4
 #define Num_pg_type_indices                    2
 
 /*
@@ -77,6 +77,7 @@
 #define ProcedureNameIndex                     "pg_proc_proname_narg_type_index"
 #define ProcedureOidIndex                      "pg_proc_oid_index"
 #define RelCheckIndex                          "pg_relcheck_rcrelid_index"
+#define RewriteOidIndex                                "pg_rewrite_oid_index"
 #define RewriteRulenameIndex           "pg_rewrite_rulename_index"
 #define ShadowNameIndex                                "pg_shadow_usename_index"
 #define ShadowSysidIndex                       "pg_shadow_usesysid_index"
@@ -84,6 +85,7 @@
 #define TriggerConstrNameIndex         "pg_trigger_tgconstrname_index"
 #define TriggerConstrRelidIndex                "pg_trigger_tgconstrrelid_index"
 #define TriggerRelidIndex                      "pg_trigger_tgrelid_index"
+#define TriggerOidIndex                                "pg_trigger_oid_index"
 #define TypeNameIndex                          "pg_type_typname_index"
 #define TypeOidIndex                           "pg_type_oid_index"
 
@@ -181,6 +183,7 @@ DECLARE_UNIQUE_INDEX(pg_proc_oid_index on pg_proc using btree(oid oid_ops));
 DECLARE_UNIQUE_INDEX(pg_proc_proname_narg_type_index on pg_proc using btree(proname name_ops, pronargs int2_ops, proargtypes oidvector_ops));
 /* This following index is not used for a cache and is not unique */
 DECLARE_INDEX(pg_relcheck_rcrelid_index on pg_relcheck using btree(rcrelid oid_ops));
+DECLARE_UNIQUE_INDEX(pg_rewrite_oid_index on pg_rewrite using btree(oid oid_ops));
 DECLARE_UNIQUE_INDEX(pg_rewrite_rulename_index on pg_rewrite using btree(rulename name_ops));
 DECLARE_UNIQUE_INDEX(pg_shadow_usename_index on pg_shadow using btree(usename name_ops));
 DECLARE_UNIQUE_INDEX(pg_shadow_usesysid_index on pg_shadow using btree(usesysid int4_ops));
@@ -188,6 +191,7 @@ DECLARE_UNIQUE_INDEX(pg_statistic_relid_att_index on pg_statistic using btree(st
 DECLARE_INDEX(pg_trigger_tgconstrname_index on pg_trigger using btree(tgconstrname name_ops));
 DECLARE_INDEX(pg_trigger_tgconstrrelid_index on pg_trigger using btree(tgconstrrelid oid_ops));
 DECLARE_INDEX(pg_trigger_tgrelid_index on pg_trigger using btree(tgrelid oid_ops));
+DECLARE_UNIQUE_INDEX(pg_trigger_oid_index on pg_trigger using btree(oid oid_ops));
 DECLARE_UNIQUE_INDEX(pg_type_oid_index on pg_type using btree(oid oid_ops));
 DECLARE_UNIQUE_INDEX(pg_type_typname_index on pg_type using btree(typname name_ops));