1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
1999-02-14 00:22:53 +01:00
|
|
|
* pg_database.h
|
1997-09-07 07:04:48 +02:00
|
|
|
* definition of the system "database" relation (pg_database)
|
|
|
|
* along with the relation's initial contents.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
2002-06-20 22:29:54 +02:00
|
|
|
* Portions Copyright (c) 1996-2002, 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
|
|
|
*
|
2002-06-20 22:29:54 +02:00
|
|
|
* $Id: pg_database.h,v 1.25 2002/06/20 20:29:44 momjian Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
* NOTES
|
1997-09-07 07:04:48 +02:00
|
|
|
* the genbki.sh script reads this file and generates .bki
|
|
|
|
* information from the DATA() statements.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
#ifndef PG_DATABASE_H
|
|
|
|
#define PG_DATABASE_H
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* postgres.h contains the system type definintions and the
|
|
|
|
* CATALOG(), BOOTSTRAP and DATA() sugar words so this file
|
|
|
|
* can be read by both genbki.sh and the C compiler.
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* pg_database definition. cpp turns this into
|
|
|
|
* typedef struct FormData_pg_database
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
*/
|
2002-04-27 23:24:34 +02:00
|
|
|
CATALOG(pg_database) BOOTSTRAP BKI_SHARED_RELATION
|
1997-09-07 07:04:48 +02:00
|
|
|
{
|
2001-08-26 18:56:03 +02:00
|
|
|
NameData datname; /* database name */
|
|
|
|
int4 datdba; /* sysid of owner */
|
|
|
|
int4 encoding; /* multibyte encoding, if any */
|
|
|
|
bool datistemplate; /* allowed as CREATE DATABASE template? */
|
2000-11-14 19:37:49 +01:00
|
|
|
bool datallowconn; /* new connections allowed? */
|
2001-08-26 18:56:03 +02:00
|
|
|
Oid datlastsysoid; /* highest OID to consider a system OID */
|
2001-10-25 07:50:21 +02:00
|
|
|
TransactionId datvacuumxid; /* all XIDs before this are vacuumed */
|
|
|
|
TransactionId datfrozenxid; /* all XIDs before this are frozen */
|
1997-09-08 04:41:22 +02:00
|
|
|
text datpath; /* VARIABLE LENGTH FIELD */
|
2002-04-21 02:26:44 +02:00
|
|
|
text datconfig[1]; /* database-specific GUC (VAR LENGTH) */
|
|
|
|
aclitem datacl[1]; /* access permissions (VAR LENGTH) */
|
1996-08-28 03:59:28 +02:00
|
|
|
} FormData_pg_database;
|
1998-09-01 06:40:42 +02:00
|
|
|
|
1996-08-28 03:59:28 +02:00
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* Form_pg_database corresponds to a pointer to a tuple with
|
|
|
|
* the format of pg_database relation.
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
typedef FormData_pg_database *Form_pg_database;
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/* ----------------
|
1997-09-07 07:04:48 +02:00
|
|
|
* compiler constants for pg_database
|
1996-08-28 03:59:28 +02:00
|
|
|
* ----------------
|
|
|
|
*/
|
2002-04-21 02:26:44 +02:00
|
|
|
#define Natts_pg_database 11
|
1997-09-07 07:04:48 +02:00
|
|
|
#define Anum_pg_database_datname 1
|
|
|
|
#define Anum_pg_database_datdba 2
|
1998-08-24 03:14:24 +02:00
|
|
|
#define Anum_pg_database_encoding 3
|
2001-03-22 05:01:46 +01:00
|
|
|
#define Anum_pg_database_datistemplate 4
|
2000-11-14 19:37:49 +01:00
|
|
|
#define Anum_pg_database_datallowconn 5
|
2001-03-22 05:01:46 +01:00
|
|
|
#define Anum_pg_database_datlastsysoid 6
|
2001-08-26 18:56:03 +02:00
|
|
|
#define Anum_pg_database_datvacuumxid 7
|
|
|
|
#define Anum_pg_database_datfrozenxid 8
|
|
|
|
#define Anum_pg_database_datpath 9
|
2002-03-01 23:45:19 +01:00
|
|
|
#define Anum_pg_database_datconfig 10
|
2002-04-21 02:26:44 +02:00
|
|
|
#define Anum_pg_database_datacl 11
|
2000-10-16 16:52:28 +02:00
|
|
|
|
2002-04-21 02:26:44 +02:00
|
|
|
DATA(insert OID = 1 ( template1 PGUID ENCODING t t 0 0 0 "" _null_ _null_ ));
|
2000-11-14 19:37:49 +01:00
|
|
|
DESCR("Default template database");
|
2000-10-16 16:52:28 +02:00
|
|
|
|
|
|
|
#define TemplateDbOid 1
|
|
|
|
|
2000-10-20 13:01:21 +02:00
|
|
|
/* Just to mark OID as used for unused_oid script -:) */
|
|
|
|
#define DATAMARKOID(x)
|
|
|
|
|
2001-03-22 05:01:46 +01:00
|
|
|
DATAMARKOID(= 2)
|
2000-10-20 13:01:21 +02:00
|
|
|
#define RecoveryDb 2
|
|
|
|
|
|
|
|
#undef DATAMARKOID
|
2001-10-28 07:26:15 +01:00
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* PG_DATABASE_H */
|