diff options
Diffstat (limited to 'src/include/utils')
-rw-r--r-- | src/include/utils/catcache.h | 10 | ||||
-rw-r--r-- | src/include/utils/lsyscache.h | 3 | ||||
-rw-r--r-- | src/include/utils/rel.h | 10 | ||||
-rw-r--r-- | src/include/utils/relcache.h | 8 | ||||
-rw-r--r-- | src/include/utils/syscache.h | 4 |
5 files changed, 23 insertions, 12 deletions
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h index 034c061e7d4..8e98f41c019 100644 --- a/src/include/utils/catcache.h +++ b/src/include/utils/catcache.h @@ -13,7 +13,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: catcache.h,v 1.40 2002/03/06 20:49:46 momjian Exp $ + * $Id: catcache.h,v 1.41 2002/03/26 19:16:56 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -33,8 +33,8 @@ typedef struct catcache { int id; /* cache identifier --- see syscache.h */ struct catcache *cc_next; /* link to next catcache */ - char *cc_relname; /* name of relation the tuples come from */ - char *cc_indname; /* name of index matching cache keys */ + 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 */ bool cc_relisshared; /* is relation shared? */ TupleDesc cc_tupdesc; /* tuple descriptor (copied from reldesc) */ @@ -107,9 +107,9 @@ extern MemoryContext CacheMemoryContext; extern void CreateCacheMemoryContext(void); extern void AtEOXact_CatCache(bool isCommit); -extern CatCache *InitCatCache(int id, char *relname, char *indname, +extern CatCache *InitCatCache(int id, const char *relname, const char *indname, int reloidattr, - int nkeys, int *key); + int nkeys, const int *key); extern void InitCatCachePhase2(CatCache *cache); extern HeapTuple SearchCatCache(CatCache *cache, diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h index 89dda37bf7c..a18ed521074 100644 --- a/src/include/utils/lsyscache.h +++ b/src/include/utils/lsyscache.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: lsyscache.h,v 1.45 2002/03/22 02:56:37 tgl Exp $ + * $Id: lsyscache.h,v 1.46 2002/03/26 19:16:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -39,6 +39,7 @@ extern RegProcedure get_oprrest(Oid opno); extern RegProcedure get_oprjoin(Oid opno); extern Oid get_func_rettype(Oid funcid); extern bool func_iscachable(Oid funcid); +extern Oid get_relname_relid(const char *relname, Oid relnamespace); extern char *get_rel_name(Oid relid); extern Oid get_rel_type_id(Oid relid); extern int16 get_typlen(Oid typid); diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 49814386ca6..16398b4c08f 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: rel.h,v 1.56 2002/02/19 20:11:19 tgl Exp $ + * $Id: rel.h,v 1.57 2002/03/26 19:16:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -282,6 +282,14 @@ typedef Relation *RelationPtr; RelationGetPhysicalRelationName(relation) \ ) +/* + * RelationGetNamespace + * + * Returns the rel's namespace OID. + */ +#define RelationGetNamespace(relation) \ + ((relation)->rd_rel->relnamespace) + /* added to prevent circular dependency. bjm 1999/11/15 */ extern char *get_temp_rel_by_physicalname(const char *relname); diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h index e5af1bee61b..6e6164b87c8 100644 --- a/src/include/utils/relcache.h +++ b/src/include/utils/relcache.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: relcache.h,v 1.30 2002/02/19 20:11:20 tgl Exp $ + * $Id: relcache.h,v 1.31 2002/03/26 19:16:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -20,11 +20,11 @@ * relation lookup routines */ extern Relation RelationIdGetRelation(Oid relationId); -extern Relation RelationNameGetRelation(const char *relationName); -extern Relation RelationNodeCacheGetRelation(RelFileNode rnode); +extern Relation RelationSysNameGetRelation(const char *relationName); /* finds an existing cache entry, but won't make a new one */ extern Relation RelationIdCacheGetRelation(Oid relationId); +extern Relation RelationNodeCacheGetRelation(RelFileNode rnode); extern void RelationClose(Relation relation); @@ -46,8 +46,10 @@ extern void RelationCacheInitializePhase3(void); * Routine to create a relcache entry for an about-to-be-created relation */ extern Relation RelationBuildLocalRelation(const char *relname, + Oid relnamespace, TupleDesc tupDesc, Oid relid, Oid dbid, + RelFileNode rnode, bool nailit); /* diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h index 45de795c9c8..49af9690758 100644 --- a/src/include/utils/syscache.h +++ b/src/include/utils/syscache.h @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: syscache.h,v 1.39 2002/03/22 21:34:44 tgl Exp $ + * $Id: syscache.h,v 1.40 2002/03/26 19:16:59 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -51,7 +51,7 @@ #define OPEROID 20 #define PROCNAME 21 #define PROCOID 22 -#define RELNAME 23 +#define RELNAMENSP 23 #define RELOID 24 #define RULENAME 25 #define SHADOWNAME 26 |