mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Add system indexes to match all caches.
Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.24 1999/11/07 23:08:12 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.25 1999/11/22 17:56:23 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -170,7 +170,7 @@ checkLockPerms(List *locks, Query *parsetree, int rt_index)
|
||||
*/
|
||||
rte = (RangeTblEntry *) nth(rt_index - 1, parsetree->rtable);
|
||||
ev_rel = heap_openr(rte->relname, AccessShareLock);
|
||||
usertup = SearchSysCacheTuple(USESYSID,
|
||||
usertup = SearchSysCacheTuple(USERSYSID,
|
||||
ObjectIdGetDatum(ev_rel->rd_rel->relowner),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(usertup))
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.32 1999/11/18 13:56:27 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.33 1999/11/22 17:56:23 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -34,7 +34,7 @@ RewriteGetRuleEventRel(char *rulename)
|
||||
HeapTuple htup;
|
||||
Oid eventrel;
|
||||
|
||||
htup = SearchSysCacheTuple(REWRITENAME,
|
||||
htup = SearchSysCacheTuple(RULENAME,
|
||||
PointerGetDatum(rulename),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(htup))
|
||||
@ -83,7 +83,7 @@ RemoveRewriteRule(char *ruleName)
|
||||
/*
|
||||
* Scan the RuleRelation ('pg_rewrite') until we find a tuple
|
||||
*/
|
||||
tuple = SearchSysCacheTupleCopy(REWRITENAME,
|
||||
tuple = SearchSysCacheTupleCopy(RULENAME,
|
||||
PointerGetDatum(ruleName),
|
||||
0, 0, 0);
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.37 1999/09/18 19:07:20 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.38 1999/11/22 17:56:23 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -42,7 +42,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
|
||||
|
||||
ruleRelation = heap_openr(RewriteRelationName, AccessShareLock);
|
||||
ruleTupdesc = RelationGetDescr(ruleRelation);
|
||||
ruletuple = SearchSysCacheTuple(RULOID,
|
||||
ruletuple = SearchSysCacheTuple(RULEOID,
|
||||
ObjectIdGetDatum(ruleoid),
|
||||
0, 0, 0);
|
||||
if (ruletuple == NULL)
|
||||
@ -81,7 +81,7 @@ IsDefinedRewriteRule(char *ruleName)
|
||||
{
|
||||
HeapTuple tuple;
|
||||
|
||||
tuple = SearchSysCacheTuple(REWRITENAME,
|
||||
tuple = SearchSysCacheTuple(RULENAME,
|
||||
PointerGetDatum(ruleName),
|
||||
0, 0, 0);
|
||||
return HeapTupleIsValid(tuple);
|
||||
|
Reference in New Issue
Block a user