diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-14 20:03:27 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-04-14 20:03:27 +0000 |
commit | 162bd08b3f2e6783d1d75ae79f86fc444d34a28d (patch) | |
tree | 0220cd8a906557db64763a1a57dd339de313d221 /src/include/utils | |
parent | 9dc2e6deaf66f97ff9157478a517d0f48a1e5060 (diff) |
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 ...
Diffstat (limited to 'src/include/utils')
-rw-r--r-- | src/include/utils/catcache.h | 6 | ||||
-rw-r--r-- | src/include/utils/lsyscache.h | 3 | ||||
-rw-r--r-- | src/include/utils/relcache.h | 3 |
3 files changed, 5 insertions, 7 deletions
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index a9e6f19b9c5..6aac341f71c 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.53 2005/03/25 18:30:28 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/catcache.h,v 1.54 2005/04/14 20:03:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -36,8 +36,8 @@ typedef struct catcache int id; /* cache identifier --- see syscache.h */ struct catcache *cc_next; /* link to next catcache */ const char *cc_relname; /* name of relation the tuples come from */ - const char *cc_indname; /* name of index matching cache keys */ Oid cc_reloid; /* OID of relation the tuples come from */ + Oid cc_indexoid; /* OID of index matching cache keys */ bool cc_relisshared; /* is relation shared across databases? */ TupleDesc cc_tupdesc; /* tuple descriptor (copied from reldesc) */ int cc_reloidattr; /* AttrNumber of relation OID attr, or 0 */ @@ -164,7 +164,7 @@ extern DLLIMPORT MemoryContext CacheMemoryContext; extern void CreateCacheMemoryContext(void); extern void AtEOXact_CatCache(bool isCommit); -extern CatCache *InitCatCache(int id, const char *relname, const char *indname, +extern CatCache *InitCatCache(int id, Oid reloid, Oid indexoid, int reloidattr, int nkeys, const int *key); extern void InitCatCachePhase2(CatCache *cache); diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index b98b53c60fc..42dbe3d2406 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.97 2005/04/11 23:06:56 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.98 2005/04/14 20:03:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -62,7 +62,6 @@ extern bool get_func_retset(Oid funcid); extern bool func_strict(Oid funcid); extern char func_volatile(Oid funcid); extern Oid get_relname_relid(const char *relname, Oid relnamespace); -extern Oid get_system_catalog_relid(const char *catname); extern char *get_rel_name(Oid relid); extern Oid get_rel_namespace(Oid relid); extern Oid get_rel_type_id(Oid relid); diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index e5e8c8e07a2..0f58921ea1a 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.49 2005/04/14 01:38:22 tgl Exp $ + * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.50 2005/04/14 20:03:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -20,7 +20,6 @@ * relation lookup routines */ extern Relation RelationIdGetRelation(Oid relationId); -extern Relation RelationSysNameGetRelation(const char *relationName); /* finds an existing cache entry, but won't make a new one */ extern Relation RelationIdCacheGetRelation(Oid relationId); |