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