1 /*-------------------------------------------------------------------------
4 * Relation descriptor cache definitions.
7 * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $Id: relcache.h,v 1.28 2001/10/28 06:26:09 momjian Exp $
12 *-------------------------------------------------------------------------
17 #include "utils/rel.h"
20 * relation lookup routines
22 extern Relation RelationIdGetRelation(Oid relationId);
23 extern Relation RelationNameGetRelation(const char *relationName);
24 extern Relation RelationNodeCacheGetRelation(RelFileNode rnode);
26 /* finds an existing cache entry, but won't make a new one */
27 extern Relation RelationIdCacheGetRelation(Oid relationId);
29 extern void RelationClose(Relation relation);
32 * Routines to compute/retrieve additional cached information
34 extern List *RelationGetIndexList(Relation relation);
36 extern void RelationInitIndexAccessInfo(Relation relation);
39 * Routines for backend startup
41 extern void RelationCacheInitialize(void);
42 extern void RelationCacheInitializePhase2(void);
45 * Routine to create a relcache entry for an about-to-be-created relation
47 extern Relation RelationBuildLocalRelation(const char *relname,
53 * Routines for flushing/rebuilding relcache entries in various scenarios
55 extern void RelationForgetRelation(Oid rid);
57 extern void RelationIdInvalidateRelationCacheByRelationId(Oid relationId);
59 extern void RelationCacheInvalidate(void);
61 extern void RelationPurgeLocalRelation(bool xactComitted);
63 extern void RelationCacheAbort(void);
67 extern void CreateDummyCaches(void);
68 extern void DestroyDummyCaches(void);
71 * both vacuum.c and relcache.c need to know the name of the relcache init file
74 #define RELCACHE_INIT_FILENAME "pg_internal.init"
76 #endif /* RELCACHE_H */