mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
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 ...
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user