1 /*-------------------------------------------------------------------------
4 * definition of the system "database" relation (pg_database)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2015, 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 int32 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 int32 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 TransactionId datminmxid; /* all multixacts in the DB are >= this */
45 Oid dattablespace; /* default table space for this DB */
47 #ifdef CATALOG_VARLEN /* variable-length fields start here */
48 aclitem datacl[1]; /* access permissions */
50 } FormData_pg_database;
53 * Form_pg_database corresponds to a pointer to a tuple with
54 * the format of pg_database relation.
57 typedef FormData_pg_database *Form_pg_database;
60 * compiler constants for pg_database
63 #define Natts_pg_database 13
64 #define Anum_pg_database_datname 1
65 #define Anum_pg_database_datdba 2
66 #define Anum_pg_database_encoding 3
67 #define Anum_pg_database_datcollate 4
68 #define Anum_pg_database_datctype 5
69 #define Anum_pg_database_datistemplate 6
70 #define Anum_pg_database_datallowconn 7
71 #define Anum_pg_database_datconnlimit 8
72 #define Anum_pg_database_datlastsysoid 9
73 #define Anum_pg_database_datfrozenxid 10
74 #define Anum_pg_database_datminmxid 11
75 #define Anum_pg_database_dattablespace 12
76 #define Anum_pg_database_datacl 13
78 DATA(insert OID = 1 ( template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1 1663 _null_));
79 SHDESCR("default template for new databases");
80 #define TemplateDbOid 1
82 #endif /* PG_DATABASE_H */