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