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/cache/typcache.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/cache/typcache.c') diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c index 7e15f884f61..01990db8ad9 100644 --- a/src/backend/utils/cache/typcache.c +++ b/src/backend/utils/cache/typcache.c @@ -36,7 +36,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/cache/typcache.c,v 1.11 2004/12/31 22:01:25 pgsql Exp $ + * $PostgreSQL: pgsql/src/backend/utils/cache/typcache.c,v 1.12 2005/04/14 20:03:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -46,7 +46,6 @@ #include "access/heapam.h" #include "access/hash.h" #include "access/nbtree.h" -#include "catalog/catname.h" #include "catalog/indexing.h" #include "catalog/pg_am.h" #include "catalog/pg_opclass.h" @@ -328,14 +327,14 @@ lookup_default_opclass(Oid type_id, Oid am_id) * that we consider all opclasses, regardless of the current search * path. */ - rel = heap_openr(OperatorClassRelationName, AccessShareLock); + rel = heap_open(OperatorClassRelationId, AccessShareLock); ScanKeyInit(&skey[0], Anum_pg_opclass_opcamid, BTEqualStrategyNumber, F_OIDEQ, ObjectIdGetDatum(am_id)); - scan = systable_beginscan(rel, OpclassAmNameNspIndex, true, + scan = systable_beginscan(rel, OpclassAmNameNspIndexId, true, SnapshotNow, 1, skey); while (HeapTupleIsValid(tup = systable_getnext(scan))) -- cgit v1.2.3