From 162bd08b3f2e6783d1d75ae79f86fc444d34a28d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 14 Apr 2005 20:03:27 +0000 Subject: 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 ... --- src/backend/utils/init/postinit.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/init/postinit.c') diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 00b541204b4..2030106f970 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.144 2005/03/19 23:27:06 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.145 2005/04/14 20:03:26 tgl Exp $ * * *------------------------------------------------------------------------- @@ -22,7 +22,6 @@ #include "catalog/catalog.h" #include "access/heapam.h" -#include "catalog/catname.h" #include "catalog/namespace.h" #include "catalog/pg_database.h" #include "catalog/pg_shadow.h" @@ -134,7 +133,7 @@ ReverifyMyDatabase(const char *name) * Because we grab RowShareLock here, we can be sure that dropdb() * is not running in parallel with us (any more). */ - pgdbrel = heap_openr(DatabaseRelationName, RowShareLock); + pgdbrel = heap_open(DatabaseRelationId, RowShareLock); ScanKeyInit(&key, Anum_pg_database_datname, @@ -537,7 +536,7 @@ ThereIsAtLeastOneUser(void) HeapScanDesc scan; bool result; - pg_shadow_rel = heap_openr(ShadowRelationName, AccessExclusiveLock); + pg_shadow_rel = heap_open(ShadowRelationId, AccessExclusiveLock); pg_shadow_dsc = RelationGetDescr(pg_shadow_rel); scan = heap_beginscan(pg_shadow_rel, SnapshotNow, 0, NULL); -- cgit v1.2.3