1996-08-28 01:59:28 +00:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-13 23:22:53 +00:00
|
|
|
* syscache.h
|
1997-09-07 05:04:48 +00:00
|
|
|
* System catalog cache definitions.
|
1996-08-28 01:59:28 +00:00
|
|
|
*
|
1999-08-09 03:13:31 +00:00
|
|
|
* See also lsyscache.h, which provides convenience routines for
|
|
|
|
* common cache-lookup operations.
|
1996-08-28 01:59:28 +00:00
|
|
|
*
|
2001-01-24 19:43:33 +00:00
|
|
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
2000-01-26 05:58:53 +00:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
1996-08-28 01:59:28 +00:00
|
|
|
*
|
2001-10-28 06:26:15 +00:00
|
|
|
* $Id: syscache.h,v 1.35 2001/10/28 06:26:09 momjian Exp $
|
1996-08-28 01:59:28 +00:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 05:04:48 +00:00
|
|
|
#ifndef SYSCACHE_H
|
1996-08-28 01:59:28 +00:00
|
|
|
#define SYSCACHE_H
|
|
|
|
|
1999-07-15 23:04:24 +00:00
|
|
|
#include "access/htup.h"
|
1996-10-19 04:16:04 +00:00
|
|
|
|
1996-08-28 01:59:28 +00:00
|
|
|
/*
|
1997-09-07 05:04:48 +00:00
|
|
|
* Declarations for util/syscache.c.
|
1996-08-28 01:59:28 +00:00
|
|
|
*
|
1997-09-07 05:04:48 +00:00
|
|
|
* SysCache identifiers.
|
1996-08-28 01:59:28 +00:00
|
|
|
*
|
1997-09-07 05:04:48 +00:00
|
|
|
* The order of these must match the order
|
2000-06-17 04:56:39 +00:00
|
|
|
* they are entered into the structure cacheinfo[] in syscache.c.
|
|
|
|
* Keep them in alphabetical order.
|
1996-08-28 01:59:28 +00:00
|
|
|
*/
|
|
|
|
|
1999-11-22 17:56:41 +00:00
|
|
|
#define AGGNAME 0
|
|
|
|
#define AMNAME 1
|
|
|
|
#define AMOPOPID 2
|
|
|
|
#define AMOPSTRATEGY 3
|
2001-08-21 16:36:06 +00:00
|
|
|
#define AMPROCNUM 4
|
|
|
|
#define ATTNAME 5
|
|
|
|
#define ATTNUM 6
|
|
|
|
#define CLAAMNAME 7
|
|
|
|
#define CLAOID 8
|
|
|
|
#define GRONAME 9
|
|
|
|
#define GROSYSID 10
|
|
|
|
#define INDEXRELID 11
|
|
|
|
#define INHRELID 12
|
|
|
|
#define LANGNAME 13
|
|
|
|
#define LANGOID 14
|
|
|
|
#define OPERNAME 15
|
|
|
|
#define OPEROID 16
|
|
|
|
#define PROCNAME 17
|
|
|
|
#define PROCOID 18
|
|
|
|
#define RELNAME 19
|
|
|
|
#define RELOID 20
|
|
|
|
#define RULENAME 21
|
|
|
|
#define SHADOWNAME 22
|
|
|
|
#define SHADOWSYSID 23
|
|
|
|
#define STATRELATT 24
|
|
|
|
#define TYPENAME 25
|
|
|
|
#define TYPEOID 26
|
1996-08-28 01:59:28 +00:00
|
|
|
|
1997-09-08 02:41:22 +00:00
|
|
|
extern void InitCatalogCache(void);
|
2000-11-16 22:30:52 +00:00
|
|
|
|
|
|
|
extern HeapTuple SearchSysCache(int cacheId,
|
2001-03-22 04:01:46 +00:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
2000-11-16 22:30:52 +00:00
|
|
|
extern void ReleaseSysCache(HeapTuple tuple);
|
|
|
|
|
|
|
|
/* convenience routines */
|
|
|
|
extern HeapTuple SearchSysCacheCopy(int cacheId,
|
2001-03-22 04:01:46 +00:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
2001-08-10 18:57:42 +00:00
|
|
|
extern bool SearchSysCacheExists(int cacheId,
|
2001-10-25 05:50:21 +00:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
2000-11-16 22:30:52 +00:00
|
|
|
extern Oid GetSysCacheOid(int cacheId,
|
2001-03-22 04:01:46 +00:00
|
|
|
Datum key1, Datum key2, Datum key3, Datum key4);
|
2000-11-16 22:30:52 +00:00
|
|
|
|
2000-01-23 03:43:24 +00:00
|
|
|
extern Datum SysCacheGetAttr(int cacheId, HeapTuple tup,
|
2000-06-17 04:56:39 +00:00
|
|
|
AttrNumber attributeNumber, bool *isNull);
|
2001-10-28 06:26:15 +00:00
|
|
|
|
1998-09-01 04:40:42 +00:00
|
|
|
#endif /* SYSCACHE_H */
|