Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit668db14

Browse files
committed
It turns out that the relcache thinks it can distinguish different
rules and triggers by OID. So, even though we have no cross-referencesin the system catalogs to pg_rewrite.oid or pg_trigger.oid, we'd betterhave unique indexes on them. Put back pg_rewrite_oid_index, which Imistakenly removed a few days ago, and add pg_trigger_oid_index.
1 parent2adf1ce commit668db14

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

‎src/backend/catalog/indexing.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.78 2001/06/12 05:55:49 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.79 2001/06/16 18:59:31 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -66,13 +66,13 @@ char *Name_pg_proc_indices[Num_pg_proc_indices] =
6666
char*Name_pg_relcheck_indices[Num_pg_relcheck_indices]=
6767
{RelCheckIndex};
6868
char*Name_pg_rewrite_indices[Num_pg_rewrite_indices]=
69-
{RewriteRulenameIndex};
69+
{RewriteOidIndex,RewriteRulenameIndex};
7070
char*Name_pg_shadow_indices[Num_pg_shadow_indices]=
7171
{ShadowNameIndex,ShadowSysidIndex};
7272
char*Name_pg_statistic_indices[Num_pg_statistic_indices]=
7373
{StatisticRelidAttnumIndex};
7474
char*Name_pg_trigger_indices[Num_pg_trigger_indices]=
75-
{TriggerRelidIndex,TriggerConstrNameIndex,TriggerConstrRelidIndex};
75+
{TriggerRelidIndex,TriggerConstrNameIndex,TriggerConstrRelidIndex,TriggerOidIndex};
7676
char*Name_pg_type_indices[Num_pg_type_indices]=
7777
{TypeNameIndex,TypeOidIndex};
7878
char*Name_pg_description_indices[Num_pg_description_indices]=

‎src/include/catalog/catversion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
3838
* Portions Copyright (c) 1994, Regents of the University of California
3939
*
40-
* $Id: catversion.h,v 1.82 2001/06/12 05:55:50 tgl Exp $
40+
* $Id: catversion.h,v 1.83 2001/06/16 18:59:31 tgl Exp $
4141
*
4242
*-------------------------------------------------------------------------
4343
*/
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO200106111
56+
#defineCATALOG_VERSION_NO200106161
5757

5858
#endif

‎src/include/catalog/indexing.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: indexing.h,v 1.50 2001/06/12 05:55:50 tgl Exp $
11+
* $Id: indexing.h,v 1.51 2001/06/16 18:59:31 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -38,10 +38,10 @@
3838
#defineNum_pg_operator_indices2
3939
#defineNum_pg_proc_indices2
4040
#defineNum_pg_relcheck_indices1
41-
#defineNum_pg_rewrite_indices1
41+
#defineNum_pg_rewrite_indices2
4242
#defineNum_pg_shadow_indices2
4343
#defineNum_pg_statistic_indices1
44-
#defineNum_pg_trigger_indices3
44+
#defineNum_pg_trigger_indices4
4545
#defineNum_pg_type_indices2
4646

4747
/*
@@ -77,13 +77,15 @@
7777
#defineProcedureNameIndex"pg_proc_proname_narg_type_index"
7878
#defineProcedureOidIndex"pg_proc_oid_index"
7979
#defineRelCheckIndex"pg_relcheck_rcrelid_index"
80+
#defineRewriteOidIndex"pg_rewrite_oid_index"
8081
#defineRewriteRulenameIndex"pg_rewrite_rulename_index"
8182
#defineShadowNameIndex"pg_shadow_usename_index"
8283
#defineShadowSysidIndex"pg_shadow_usesysid_index"
8384
#defineStatisticRelidAttnumIndex"pg_statistic_relid_att_index"
8485
#defineTriggerConstrNameIndex"pg_trigger_tgconstrname_index"
8586
#defineTriggerConstrRelidIndex"pg_trigger_tgconstrrelid_index"
8687
#defineTriggerRelidIndex"pg_trigger_tgrelid_index"
88+
#defineTriggerOidIndex"pg_trigger_oid_index"
8789
#defineTypeNameIndex"pg_type_typname_index"
8890
#defineTypeOidIndex"pg_type_oid_index"
8991

@@ -181,13 +183,15 @@ DECLARE_UNIQUE_INDEX(pg_proc_oid_index on pg_proc using btree(oid oid_ops));
181183
DECLARE_UNIQUE_INDEX(pg_proc_proname_narg_type_indexonpg_procusingbtree(pronamename_ops,pronargsint2_ops,proargtypesoidvector_ops));
182184
/* This following index is not used for a cache and is not unique */
183185
DECLARE_INDEX(pg_relcheck_rcrelid_indexonpg_relcheckusingbtree(rcrelidoid_ops));
186+
DECLARE_UNIQUE_INDEX(pg_rewrite_oid_indexonpg_rewriteusingbtree(oidoid_ops));
184187
DECLARE_UNIQUE_INDEX(pg_rewrite_rulename_indexonpg_rewriteusingbtree(rulenamename_ops));
185188
DECLARE_UNIQUE_INDEX(pg_shadow_usename_indexonpg_shadowusingbtree(usenamename_ops));
186189
DECLARE_UNIQUE_INDEX(pg_shadow_usesysid_indexonpg_shadowusingbtree(usesysidint4_ops));
187190
DECLARE_UNIQUE_INDEX(pg_statistic_relid_att_indexonpg_statisticusingbtree(starelidoid_ops,staattnumint2_ops));
188191
DECLARE_INDEX(pg_trigger_tgconstrname_indexonpg_triggerusingbtree(tgconstrnamename_ops));
189192
DECLARE_INDEX(pg_trigger_tgconstrrelid_indexonpg_triggerusingbtree(tgconstrrelidoid_ops));
190193
DECLARE_INDEX(pg_trigger_tgrelid_indexonpg_triggerusingbtree(tgrelidoid_ops));
194+
DECLARE_UNIQUE_INDEX(pg_trigger_oid_indexonpg_triggerusingbtree(oidoid_ops));
191195
DECLARE_UNIQUE_INDEX(pg_type_oid_indexonpg_typeusingbtree(oidoid_ops));
192196
DECLARE_UNIQUE_INDEX(pg_type_typname_indexonpg_typeusingbtree(typnamename_ops));
193197

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp