~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/include/utils/relcache.h

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * relcache.h
 
4
 *        Relation descriptor cache definitions.
 
5
 *
 
6
 *
 
7
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
 
8
 * Portions Copyright (c) 1994, Regents of the University of California
 
9
 *
 
10
 * $PostgreSQL: pgsql/src/include/utils/relcache.h,v 1.48 2005-01-10 20:02:24 tgl Exp $
 
11
 *
 
12
 *-------------------------------------------------------------------------
 
13
 */
 
14
#ifndef RELCACHE_H
 
15
#define RELCACHE_H
 
16
 
 
17
#include "utils/rel.h"
 
18
 
 
19
/*
 
20
 * relation lookup routines
 
21
 */
 
22
extern Relation RelationIdGetRelation(Oid relationId);
 
23
extern Relation RelationSysNameGetRelation(const char *relationName);
 
24
 
 
25
/* finds an existing cache entry, but won't make a new one */
 
26
extern Relation RelationIdCacheGetRelation(Oid relationId);
 
27
 
 
28
extern void RelationClose(Relation relation);
 
29
 
 
30
/*
 
31
 * Routines to compute/retrieve additional cached information
 
32
 */
 
33
extern List *RelationGetIndexList(Relation relation);
 
34
extern List *RelationGetIndexExpressions(Relation relation);
 
35
extern List *RelationGetIndexPredicate(Relation relation);
 
36
 
 
37
extern void RelationSetIndexList(Relation relation, List *indexIds);
 
38
 
 
39
extern void RelationInitIndexAccessInfo(Relation relation);
 
40
 
 
41
/*
 
42
 * Routines for backend startup
 
43
 */
 
44
extern void RelationCacheInitialize(void);
 
45
extern void RelationCacheInitializePhase2(void);
 
46
extern void RelationCacheInitializePhase3(void);
 
47
 
 
48
/*
 
49
 * Routine to create a relcache entry for an about-to-be-created relation
 
50
 */
 
51
extern Relation RelationBuildLocalRelation(const char *relname,
 
52
                                                   Oid relnamespace,
 
53
                                                   TupleDesc tupDesc,
 
54
                                                   Oid relid,
 
55
                                                   Oid reltablespace,
 
56
                                                   bool shared_relation,
 
57
                                                   bool nailit);
 
58
 
 
59
/*
 
60
 * Routines for flushing/rebuilding relcache entries in various scenarios
 
61
 */
 
62
extern void RelationForgetRelation(Oid rid);
 
63
 
 
64
extern void RelationCacheInvalidateEntry(Oid relationId);
 
65
 
 
66
extern void RelationCacheInvalidate(void);
 
67
 
 
68
extern void AtEOXact_RelationCache(bool isCommit);
 
69
extern void AtEOSubXact_RelationCache(bool isCommit, SubTransactionId mySubid,
 
70
                                                                          SubTransactionId parentSubid);
 
71
 
 
72
/*
 
73
 * Routines to help manage rebuilding of relcache init file
 
74
 */
 
75
extern bool RelationIdIsInInitFile(Oid relationId);
 
76
extern void RelationCacheInitFileInvalidate(bool beforeSend);
 
77
 
 
78
/* should be used only by relcache.c and catcache.c */
 
79
extern bool criticalRelcachesBuilt;
 
80
 
 
81
#endif   /* RELCACHE_H */