1 /*-------------------------------------------------------------------------
4 * definition of the system "database" relation (pg_database)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
14 * the genbki.sh script reads this file and generates .bki
15 * information from the DATA() statements.
17 *-------------------------------------------------------------------------
22 #include "catalog/genbki.h"
25 * pg_database definition. cpp turns this into
26 * typedef struct FormData_pg_database
29 #define DatabaseRelationId 1262
31 CATALOG(pg_database
,1262) BKI_SHARED_RELATION
33 NameData datname
; /* database name */
34 Oid datdba
; /* owner of database */
35 int4 encoding
; /* character encoding */
36 NameData datcollate
; /* LC_COLLATE setting */
37 NameData datctype
; /* LC_CTYPE setting */
38 bool datistemplate
; /* allowed as CREATE DATABASE template? */
39 bool datallowconn
; /* new connections allowed? */
40 int4 datconnlimit
; /* max connections allowed (-1=no limit) */
41 Oid datlastsysoid
; /* highest OID to consider a system OID */
42 TransactionId datfrozenxid
; /* all Xids < this are frozen in this DB */
43 Oid dattablespace
; /* default table space for this DB */
44 text datconfig
[1]; /* database-specific GUC (VAR LENGTH) */
45 aclitem datacl
[1]; /* access permissions (VAR LENGTH) */
46 } FormData_pg_database
;
49 * Form_pg_database corresponds to a pointer to a tuple with
50 * the format of pg_database relation.
53 typedef FormData_pg_database
*Form_pg_database
;
56 * compiler constants for pg_database
59 #define Natts_pg_database 13
60 #define Anum_pg_database_datname 1
61 #define Anum_pg_database_datdba 2
62 #define Anum_pg_database_encoding 3
63 #define Anum_pg_database_datcollate 4
64 #define Anum_pg_database_datctype 5
65 #define Anum_pg_database_datistemplate 6
66 #define Anum_pg_database_datallowconn 7
67 #define Anum_pg_database_datconnlimit 8
68 #define Anum_pg_database_datlastsysoid 9
69 #define Anum_pg_database_datfrozenxid 10
70 #define Anum_pg_database_dattablespace 11
71 #define Anum_pg_database_datconfig 12
72 #define Anum_pg_database_datacl 13
74 DATA(insert OID
= 1 ( template1 PGUID ENCODING
"LC_COLLATE" "LC_CTYPE" t t
-1 0 0 1663 _null_ _null_
));
75 SHDESCR("default template database");
76 #define TemplateDbOid 1
78 #endif /* PG_DATABASE_H */