1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* syscache.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* System catalog cache definitions.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
1999-08-09 05:13:31 +02:00
|
|
|
* See also lsyscache.h, which provides convenience routines for
|
|
|
|
* common cache-lookup operations.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2006-03-05 16:59:11 +01:00
|
|
|
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
2000-01-26 06:58:53 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
2006-07-11 15:54:25 +02:00
|
|
|
* $PostgreSQL: pgsql/src/include/utils/syscache.h,v 1.64 2006/07/11 13:54:24 momjian Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef SYSCACHE_H
|
1996-08-28 03:59:28 +02:00
|
|
|
#define SYSCACHE_H
|
|
|
|
|
1999-07-16 01:04:24 +02:00
|
|
|
#include "access/htup.h"
|
2006-07-11 15:54:25 +02:00
|
|
|
#include "utils/catcache.h"
|
1996-10-19 06:16:04 +02:00
|
|
|
|
1996-08-28 03:59:28 +02:00
|
|
|
/*
|
1997-09-07 07:04:48 +02:00
|
|
|
* Declarations for util/syscache.c.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
1997-09-07 07:04:48 +02:00
|
|
|
* SysCache identifiers.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
1997-09-07 07:04:48 +02:00
|
|
|
* The order of these must match the order
|
2000-06-17 06:56:39 +02:00
|
|
|
* they are entered into the structure cacheinfo[] in syscache.c.
|
|
|
|
* Keep them in alphabetical order.
|
1996-08-28 03:59:28 +02:00
|
|
|
*/
|
|
|
|
|
2002-04-11 22:00:18 +02:00
|
|
|
#define AGGFNOID 0
|
|
|
|
#define AMNAME 1
|
|
|
|
#define AMOID 2
|
|
|
|
#define AMOPOPID 3
|
|
|
|
#define AMOPSTRATEGY 4
|
|
|
|
#define AMPROCNUM 5
|
|
|
|
#define ATTNAME 6
|
|
|
|
#define ATTNUM 7
|
2005-06-28 07:09:14 +02:00
|
|
|
#define AUTHMEMMEMROLE 8
|
|
|
|
#define AUTHMEMROLEMEM 9
|
|
|
|
#define AUTHNAME 10
|
|
|
|
#define AUTHOID 11
|
|
|
|
#define CASTSOURCETARGET 12
|
|
|
|
#define CLAAMNAMENSP 13
|
|
|
|
#define CLAOID 14
|
|
|
|
#define CONDEFAULT 15
|
|
|
|
#define CONNAMENSP 16
|
|
|
|
#define CONOID 17
|
2006-05-04 00:45:26 +02:00
|
|
|
#define DATABASEOID 18
|
|
|
|
#define INDEXRELID 19
|
|
|
|
#define INHRELID 20
|
|
|
|
#define LANGNAME 21
|
|
|
|
#define LANGOID 22
|
|
|
|
#define NAMESPACENAME 23
|
|
|
|
#define NAMESPACEOID 24
|
|
|
|
#define OPERNAMENSP 25
|
|
|
|
#define OPEROID 26
|
|
|
|
#define PROCNAMEARGSNSP 27
|
|
|
|
#define PROCOID 28
|
|
|
|
#define RELNAMENSP 29
|
|
|
|
#define RELOID 30
|
|
|
|
#define RULERELNAME 31
|
|
|
|
#define STATRELATT 32
|
|
|
|
#define TYPENAMENSP 33
|
|
|
|
#define TYPEOID 34
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void InitCatalogCache(void);
|
2002-02-19 21:11:20 +01:00
|
|
|
extern void InitCatalogCachePhase2(void);
|
2000-11-16 23:30:52 +01:00
|
|
|
|
|
|
|
extern HeapTuple SearchSysCache(int cacheId,
|
2001-03-22 05:01:46 +01:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
2000-11-16 23:30:52 +01:00
|
|
|
extern void ReleaseSysCache(HeapTuple tuple);
|
|
|
|
|
|
|
|
/* convenience routines */
|
|
|
|
extern HeapTuple SearchSysCacheCopy(int cacheId,
|
2001-03-22 05:01:46 +01:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
2001-08-10 20:57:42 +02:00
|
|
|
extern bool SearchSysCacheExists(int cacheId,
|
2001-10-25 07:50:21 +02:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
2000-11-16 23:30:52 +01:00
|
|
|
extern Oid GetSysCacheOid(int cacheId,
|
2001-03-22 05:01:46 +01:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
2000-11-16 23:30:52 +01:00
|
|
|
|
2002-08-02 20:15:10 +02:00
|
|
|
extern HeapTuple SearchSysCacheAttName(Oid relid, const char *attname);
|
|
|
|
extern HeapTuple SearchSysCacheCopyAttName(Oid relid, const char *attname);
|
|
|
|
extern bool SearchSysCacheExistsAttName(Oid relid, const char *attname);
|
|
|
|
|
2000-01-23 04:43:24 +01:00
|
|
|
extern Datum SysCacheGetAttr(int cacheId, HeapTuple tup,
|
2000-06-17 06:56:39 +02:00
|
|
|
AttrNumber attributeNumber, bool *isNull);
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2002-04-06 08:59:25 +02:00
|
|
|
/* list-search interface. Users of this must import catcache.h too */
|
|
|
|
extern struct catclist *SearchSysCacheList(int cacheId, int nkeys,
|
2002-09-04 22:31:48 +02:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
|
|
|
|
|
|
|
#define ReleaseSysCacheList(x) ReleaseCatCacheList(x)
|
2002-04-06 08:59:25 +02:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* SYSCACHE_H */
|