1 /*-------------------------------------------------------------------------
4 * System catalog cache definitions.
7 * Copyright (c) 1994, Regents of the University of California
9 * $Id: syscache.h,v 1.15 1999/07/15 23:04:24 momjian Exp $
11 *-------------------------------------------------------------------------
16 #include "access/htup.h"
18 /* #define CACHEDEBUG *//* turns DEBUG elogs on */
22 * Declarations for util/syscache.c.
24 * SysCache identifiers.
26 * The order of these must match the order
27 * they are entered into the structure cacheinfo[] in syscache.c
28 * The best thing to do is to add yours at the END, because some
29 * code assumes that certain caches are at certain places in this
34 #define AMOPSTRATEGY 1
49 #define INDRELIDKEY 16
58 #define REWRITENAME 25
64 * struct cachedesc: information needed for a call to InitSysCache()
69 char *name; /* this is Name so that we can initialize
73 int size; /* sizeof(appropriate struct) */
74 char *indname; /* index relation for this cache, if
76 HeapTuple (*iScanFunc) ();/* function to handle index scans */
79 extern void zerocaches(void);
80 extern void InitCatalogCache(void);
81 extern HeapTuple SearchSysCacheTupleCopy(int cacheId,
82 Datum key1, Datum key2, Datum key3, Datum key4);
83 extern HeapTuple SearchSysCacheTuple(int cacheId,
84 Datum key1, Datum key2, Datum key3, Datum key4);
85 extern int32 SearchSysCacheStruct(int cacheId, char *returnStruct,
86 Datum key1, Datum key2, Datum key3, Datum key4);
87 extern void *SearchSysCacheGetAttribute(int cacheId,
88 AttrNumber attributeNumber,
89 Datum key1, Datum key2, Datum key3, Datum key4);
90 extern void *TypeDefaultRetrieve(Oid typId);
92 #endif /* SYSCACHE_H */