1 /*-------------------------------------------------------------------------
4 * definition of the system "database" relation (pg_database)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * src/include/catalog/pg_database.h
14 * the genbki.pl 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
30 #define DatabaseRelation_Rowtype_Id 1248
32 CATALOG(pg_database,1262) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248) BKI_SCHEMA_MACRO
34 NameData datname; /* database name */
35 Oid datdba; /* owner of database */
36 int4 encoding; /* character encoding */
37 NameData datcollate; /* LC_COLLATE setting */
38 NameData datctype; /* LC_CTYPE setting */
39 bool datistemplate; /* allowed as CREATE DATABASE template? */
40 bool datallowconn; /* new connections allowed? */
41 int4 datconnlimit; /* max connections allowed (-1=no limit) */
42 Oid datlastsysoid; /* highest OID to consider a system OID */
43 TransactionId datfrozenxid; /* all Xids < this are frozen in this DB */
44 Oid dattablespace; /* default table space for this DB */
46 #ifdef CATALOG_VARLEN /* variable-length fields start here */
47 aclitem datacl[1]; /* access permissions */
49 } FormData_pg_database;
52 * Form_pg_database corresponds to a pointer to a tuple with
53 * the format of pg_database relation.
56 typedef FormData_pg_database *Form_pg_database;
59 * compiler constants for pg_database
62 #define Natts_pg_database 12
63 #define Anum_pg_database_datname 1
64 #define Anum_pg_database_datdba 2
65 #define Anum_pg_database_encoding 3
66 #define Anum_pg_database_datcollate 4
67 #define Anum_pg_database_datctype 5
68 #define Anum_pg_database_datistemplate 6
69 #define Anum_pg_database_datallowconn 7
70 #define Anum_pg_database_datconnlimit 8
71 #define Anum_pg_database_datlastsysoid 9
72 #define Anum_pg_database_datfrozenxid 10
73 #define Anum_pg_database_dattablespace 11
74 #define Anum_pg_database_datacl 12
76 DATA(insert OID = 1 ( template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1663 _null_));
77 SHDESCR("default template for new databases");
78 #define TemplateDbOid 1
80 #endif /* PG_DATABASE_H */