mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Replace uses of heap_open et al with the corresponding table_* function.
Author: Andres Freund Discussion: https://postgr.es/m/20190111000539.xbv7s6w7ilcvm7dp@alap3.anarazel.de
This commit is contained in:
@ -47,7 +47,7 @@ RemoveRewriteRuleById(Oid ruleOid)
|
||||
/*
|
||||
* Open the pg_rewrite relation.
|
||||
*/
|
||||
RewriteRelation = heap_open(RewriteRelationId, RowExclusiveLock);
|
||||
RewriteRelation = table_open(RewriteRelationId, RowExclusiveLock);
|
||||
|
||||
/*
|
||||
* Find the tuple for the target rule.
|
||||
@ -71,7 +71,7 @@ RemoveRewriteRuleById(Oid ruleOid)
|
||||
* suffice if it's not an ON SELECT rule.)
|
||||
*/
|
||||
eventRelationOid = ((Form_pg_rewrite) GETSTRUCT(tuple))->ev_class;
|
||||
event_relation = heap_open(eventRelationOid, AccessExclusiveLock);
|
||||
event_relation = table_open(eventRelationOid, AccessExclusiveLock);
|
||||
|
||||
/*
|
||||
* Now delete the pg_rewrite tuple for the rule
|
||||
@ -80,7 +80,7 @@ RemoveRewriteRuleById(Oid ruleOid)
|
||||
|
||||
systable_endscan(rcscan);
|
||||
|
||||
heap_close(RewriteRelation, RowExclusiveLock);
|
||||
table_close(RewriteRelation, RowExclusiveLock);
|
||||
|
||||
/*
|
||||
* Issue shared-inval notice to force all backends (including me!) to
|
||||
@ -89,5 +89,5 @@ RemoveRewriteRuleById(Oid ruleOid)
|
||||
CacheInvalidateRelcache(event_relation);
|
||||
|
||||
/* Close rel, but keep lock till commit... */
|
||||
heap_close(event_relation, NoLock);
|
||||
table_close(event_relation, NoLock);
|
||||
}
|
||||
|
Reference in New Issue
Block a user