PostgreSQL Source Code  git master
pg_database.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * pg_database.h
4  * definition of the "database" system catalog (pg_database)
5  *
6  *
7  * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * src/include/catalog/pg_database.h
11  *
12  * NOTES
13  * The Catalog.pm module reads this file and derives schema
14  * information.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PG_DATABASE_H
19 #define PG_DATABASE_H
20 
21 #include "catalog/genbki.h"
22 #include "catalog/pg_database_d.h"
23 
24 /* ----------------
25  * pg_database definition. cpp turns this into
26  * typedef struct FormData_pg_database
27  * ----------------
28  */
29 CATALOG(pg_database,1262,DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248,DatabaseRelation_Rowtype_Id) BKI_SCHEMA_MACRO
30 {
31  /* oid */
32  Oid oid;
33 
34  /* database name */
36 
37  /* owner of database */
38  Oid datdba BKI_DEFAULT(PGUID);
39 
40  /* character encoding */
42 
43  /* LC_COLLATE setting */
45 
46  /* LC_CTYPE setting */
48 
49  /* allowed as CREATE DATABASE template? */
51 
52  /* new connections allowed? */
54 
55  /* max connections allowed (-1=no limit) */
57 
58  /* highest OID to consider a system OID */
60 
61  /* all Xids < this are frozen in this DB */
63 
64  /* all multixacts in the DB are >= this */
66 
67  /* default table space for this DB */
68  Oid dattablespace BKI_LOOKUP(pg_tablespace);
69 
70 #ifdef CATALOG_VARLEN /* variable-length fields start here */
71  /* access permissions */
72  aclitem datacl[1];
73 #endif
75 
76 /* ----------------
77  * Form_pg_database corresponds to a pointer to a tuple with
78  * the format of pg_database relation.
79  * ----------------
80  */
82 
83 #endif /* PG_DATABASE_H */
Oid datlastsysoid
Definition: pg_database.h:59
uint32 TransactionId
Definition: c.h:514
FormData_pg_database * Form_pg_database
Definition: pg_database.h:81
#define BKI_SHARED_RELATION
Definition: genbki.h:27
Oid dattablespace BKI_LOOKUP(pg_tablespace)
CATALOG(pg_database, 1262, DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248
NameData datname
Definition: pg_database.h:35
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:347
bool datallowconn
Definition: pg_database.h:53
bool datistemplate
Definition: pg_database.h:50
NameData datcollate
Definition: pg_database.h:44
DatabaseRelation_Rowtype_Id BKI_SCHEMA_MACRO
Definition: pg_database.h:30
NameData datctype
Definition: pg_database.h:47
Definition: c.h:610
int32 datconnlimit
Definition: pg_database.h:56
#define BKI_ROWTYPE_OID(oid, oidmacro)
Definition: genbki.h:28
TransactionId datfrozenxid
Definition: pg_database.h:62
TransactionId datminmxid
Definition: pg_database.h:65
int32 encoding
Definition: pg_database.h:41
FormData_pg_database
Definition: pg_database.h:74
Oid datdba BKI_DEFAULT(PGUID)