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/storage/large_object/inv_api.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/backend/storage/large_object/inv_api.c') diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c index 34129265796..299e0756d1f 100644 --- a/src/backend/storage/large_object/inv_api.c +++ b/src/backend/storage/large_object/inv_api.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.109 2005/01/27 23:24:09 neilc Exp $ + * $PostgreSQL: pgsql/src/backend/storage/large_object/inv_api.c,v 1.110 2005/04/14 20:03:25 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,7 +19,6 @@ #include "access/heapam.h" #include "access/tuptoaster.h" #include "catalog/catalog.h" -#include "catalog/catname.h" #include "catalog/indexing.h" #include "catalog/pg_largeobject.h" #include "commands/comment.h" @@ -60,9 +59,9 @@ open_lo_relation(void) /* Use RowExclusiveLock since we might either read or write */ if (lo_heap_r == NULL) - lo_heap_r = heap_openr(LargeObjectRelationName, RowExclusiveLock); + lo_heap_r = heap_open(LargeObjectRelationId, RowExclusiveLock); if (lo_index_r == NULL) - lo_index_r = index_openr(LargeObjectLOidPNIndex); + lo_index_r = index_open(LargeObjectLOidPNIndexId); } PG_CATCH(); { @@ -230,15 +229,10 @@ inv_close(LargeObjectDesc *obj_desc) int inv_drop(Oid lobjId) { - Oid classoid; - LargeObjectDrop(lobjId); - /* pg_largeobject doesn't have a hard-coded OID, so must look it up */ - classoid = get_system_catalog_relid(LargeObjectRelationName); - /* Delete any comments on the large object */ - DeleteComments(lobjId, classoid, 0); + DeleteComments(lobjId, LargeObjectRelationId, 0); /* * Advance command counter so that tuple removal will be seen by later -- cgit v1.2.3