aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ruleutils.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-04-14 20:03:27 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-04-14 20:03:27 +0000
commit162bd08b3f2e6783d1d75ae79f86fc444d34a28d (patch)
tree0220cd8a906557db64763a1a57dd339de313d221 /src/backend/utils/adt/ruleutils.c
parent9dc2e6deaf66f97ff9157478a517d0f48a1e5060 (diff)
downloadpostgresql-162bd08b3f2e6783d1d75ae79f86fc444d34a28d.tar.gz
postgresql-162bd08b3f2e6783d1d75ae79f86fc444d34a28d.zip
Completion of project to use fixed OIDs for all system catalogs and
indexes. Replace all heap_openr and index_openr calls by heap_open and index_open. Remove runtime lookups of catalog OID numbers in various places. Remove relcache's support for looking up system catalogs by name. Bulky but mostly very boring patch ...
Diffstat (limited to 'src/backend/utils/adt/ruleutils.c')
-rw-r--r--src/backend/utils/adt/ruleutils.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index af840cdf971..37f3687688c 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -3,7 +3,7 @@
* back to source text
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.192 2005/04/14 01:38:19 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.193 2005/04/14 20:03:26 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -41,7 +41,6 @@
#include <fcntl.h>
#include "access/genam.h"
-#include "catalog/catname.h"
#include "catalog/dependency.h"
#include "catalog/heap.h"
#include "catalog/index.h"
@@ -469,14 +468,14 @@ pg_get_triggerdef(PG_FUNCTION_ARGS)
/*
* Fetch the pg_trigger tuple by the Oid of the trigger
*/
- tgrel = heap_openr(TriggerRelationName, AccessShareLock);
+ tgrel = heap_open(TriggerRelationId, AccessShareLock);
ScanKeyInit(&skey[0],
ObjectIdAttributeNumber,
BTEqualStrategyNumber, F_OIDEQ,
ObjectIdGetDatum(trigid));
- tgscan = systable_beginscan(tgrel, TriggerOidIndex, true,
+ tgscan = systable_beginscan(tgrel, TriggerOidIndexId, true,
SnapshotNow, 1, skey);
ht_trig = systable_getnext(tgscan);
@@ -867,14 +866,14 @@ pg_get_constraintdef_worker(Oid constraintId, bool fullCommand,
* Fetch the pg_constraint row. There's no syscache for pg_constraint
* so we must do it the hard way.
*/
- conDesc = heap_openr(ConstraintRelationName, AccessShareLock);
+ conDesc = heap_open(ConstraintRelationId, AccessShareLock);
ScanKeyInit(&skey[0],
ObjectIdAttributeNumber,
BTEqualStrategyNumber, F_OIDEQ,
ObjectIdGetDatum(constraintId));
- conscan = systable_beginscan(conDesc, ConstraintOidIndex, true,
+ conscan = systable_beginscan(conDesc, ConstraintOidIndexId, true,
SnapshotNow, 1, skey);
tup = systable_getnext(conscan);
@@ -1269,7 +1268,7 @@ pg_get_serial_sequence(PG_FUNCTION_ARGS)
column, tablerv->relname)));
/* Search the dependency table for the dependent sequence */
- depRel = heap_openr(DependRelationName, AccessShareLock);
+ depRel = heap_open(DependRelationId, AccessShareLock);
ScanKeyInit(&key[0],
Anum_pg_depend_refclassid,
@@ -1284,7 +1283,7 @@ pg_get_serial_sequence(PG_FUNCTION_ARGS)
BTEqualStrategyNumber, F_INT4EQ,
Int32GetDatum(attnum));
- scan = systable_beginscan(depRel, DependReferenceIndex, true,
+ scan = systable_beginscan(depRel, DependReferenceIndexId, true,
SnapshotNow, 3, key);
while (HeapTupleIsValid(tup = systable_getnext(scan)))