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
|
|
|
*
|
|
|
|
*
|
2009-01-01 18:24:05 +01:00
|
|
|
* Portions Copyright (c) 1996-2009, 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
|
|
|
*
|
2009-09-27 00:42:03 +02:00
|
|
|
* $PostgreSQL: pgsql/src/include/catalog/pg_database.h,v 1.50 2009/09/26 22:42:02 tgl 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
|
|
|
|
|
2008-03-27 04:57:34 +01:00
|
|
|
#include "catalog/genbki.h"
|
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
|
|
|
*/
|
2005-10-15 04:49:52 +02:00
|
|
|
#define DatabaseRelationId 1262
|
2009-09-27 00:42:03 +02:00
|
|
|
#define DatabaseRelation_Rowtype_Id 1248
|
2005-04-14 03:38:22 +02:00
|
|
|
|
2009-09-27 00:42:03 +02:00
|
|
|
CATALOG(pg_database,1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248)
|
1997-09-07 07:04:48 +02:00
|
|
|
{
|
2001-08-26 18:56:03 +02:00
|
|
|
NameData datname; /* database name */
|
2005-06-28 07:09:14 +02:00
|
|
|
Oid datdba; /* owner of database */
|
2002-09-03 23:45:44 +02:00
|
|
|
int4 encoding; /* character encoding */
|
2008-09-23 11:20:39 +02:00
|
|
|
NameData datcollate; /* LC_COLLATE setting */
|
|
|
|
NameData datctype; /* LC_CTYPE setting */
|
2001-08-26 18:56:03 +02:00
|
|
|
bool datistemplate; /* allowed as CREATE DATABASE template? */
|
2000-11-14 19:37:49 +01:00
|
|
|
bool datallowconn; /* new connections allowed? */
|
2005-07-31 19:19:22 +02:00
|
|
|
int4 datconnlimit; /* max connections allowed (-1=no limit) */
|
2001-08-26 18:56:03 +02:00
|
|
|
Oid datlastsysoid; /* highest OID to consider a system OID */
|
2007-11-15 22:14:46 +01:00
|
|
|
TransactionId datfrozenxid; /* all Xids < this are frozen in this DB */
|
2004-06-18 08:14:31 +02:00
|
|
|
Oid dattablespace; /* default table space for this DB */
|
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
|
|
|
* ----------------
|
|
|
|
*/
|
2008-09-23 11:20:39 +02:00
|
|
|
#define Natts_pg_database 13
|
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
|
2008-09-23 11:20:39 +02:00
|
|
|
#define Anum_pg_database_datcollate 4
|
|
|
|
#define Anum_pg_database_datctype 5
|
|
|
|
#define Anum_pg_database_datistemplate 6
|
|
|
|
#define Anum_pg_database_datallowconn 7
|
|
|
|
#define Anum_pg_database_datconnlimit 8
|
|
|
|
#define Anum_pg_database_datlastsysoid 9
|
|
|
|
#define Anum_pg_database_datfrozenxid 10
|
|
|
|
#define Anum_pg_database_dattablespace 11
|
|
|
|
#define Anum_pg_database_datconfig 12
|
|
|
|
#define Anum_pg_database_datacl 13
|
2000-10-16 16:52:28 +02:00
|
|
|
|
2008-09-23 11:20:39 +02:00
|
|
|
DATA(insert OID = 1 ( template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1663 _null_ _null_));
|
2007-09-03 04:30:45 +02:00
|
|
|
SHDESCR("default template database");
|
2000-10-16 16:52:28 +02:00
|
|
|
#define TemplateDbOid 1
|
|
|
|
|
2001-11-05 18:46:40 +01:00
|
|
|
#endif /* PG_DATABASE_H */
|