mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +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:
@ -36,7 +36,6 @@
|
||||
#include "funcapi.h"
|
||||
#include "access/tupdesc.h"
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/namespace.h"
|
||||
#include "catalog/pg_index.h"
|
||||
#include "catalog/pg_type.h"
|
||||
@ -1538,7 +1537,7 @@ get_pkey_attnames(Oid relid, int16 *numatts)
|
||||
*numatts = 0;
|
||||
|
||||
/* use relid to get all related indexes */
|
||||
indexRelation = heap_openr(IndexRelationName, AccessShareLock);
|
||||
indexRelation = heap_open(IndexRelationId, AccessShareLock);
|
||||
ScanKeyInit(&entry,
|
||||
Anum_pg_index_indrelid,
|
||||
BTEqualStrategyNumber, F_OIDEQ,
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "access/heapam.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/indexing.h"
|
||||
#include "catalog/pg_proc.h"
|
||||
#include "catalog/pg_type.h"
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "access/relscan.h"
|
||||
#include "access/skey.h"
|
||||
#include "access/tupdesc.h"
|
||||
#include "catalog/catname.h"
|
||||
#include "catalog/pg_listener.h"
|
||||
#include "commands/async.h"
|
||||
#include "fmgr.h"
|
||||
@ -75,7 +74,7 @@ active_listeners(text *relname)
|
||||
int ourpid = getpid();
|
||||
char listen_name[NAMEDATALEN];
|
||||
|
||||
lRel = heap_openr(ListenerRelationName, AccessShareLock);
|
||||
lRel = heap_open(ListenerRelationId, AccessShareLock);
|
||||
tdesc = RelationGetDescr(lRel);
|
||||
|
||||
if (relname && (VARSIZE(relname) > VARHDRSZ))
|
||||
|
Reference in New Issue
Block a user