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-2018, 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  NameData datname; /* database name */
32  Oid datdba; /* owner of database */
33  int32 encoding; /* character encoding */
34  NameData datcollate; /* LC_COLLATE setting */
35  NameData datctype; /* LC_CTYPE setting */
36  bool datistemplate; /* allowed as CREATE DATABASE template? */
37  bool datallowconn; /* new connections allowed? */
38  int32 datconnlimit; /* max connections allowed (-1=no limit) */
39  Oid datlastsysoid; /* highest OID to consider a system OID */
40  TransactionId datfrozenxid; /* all Xids < this are frozen in this DB */
41  TransactionId datminmxid; /* all multixacts in the DB are >= this */
42  Oid dattablespace; /* default table space for this DB */
43 
44 #ifdef CATALOG_VARLEN /* variable-length fields start here */
45  aclitem datacl[1]; /* access permissions */
46 #endif
48 
49 /* ----------------
50  * Form_pg_database corresponds to a pointer to a tuple with
51  * the format of pg_database relation.
52  * ----------------
53  */
55 
56 #endif /* PG_DATABASE_H */
Oid datlastsysoid
Definition: pg_database.h:39
Oid datdba
Definition: pg_database.h:32
uint32 TransactionId
Definition: c.h:474
FormData_pg_database * Form_pg_database
Definition: pg_database.h:54
#define BKI_SHARED_RELATION
Definition: genbki.h:27
CATALOG(pg_database, 1262, DatabaseRelationId) BKI_SHARED_RELATION BKI_ROWTYPE_OID(1248
unsigned int Oid
Definition: postgres_ext.h:31
signed int int32
Definition: c.h:313
bool datallowconn
Definition: pg_database.h:37
bool datistemplate
Definition: pg_database.h:36
NameData datcollate
Definition: pg_database.h:34
DatabaseRelation_Rowtype_Id BKI_SCHEMA_MACRO
Definition: pg_database.h:30
NameData datctype
Definition: pg_database.h:35
Definition: c.h:570
Oid dattablespace
Definition: pg_database.h:42
int32 datconnlimit
Definition: pg_database.h:38
#define BKI_ROWTYPE_OID(oid, oidmacro)
Definition: genbki.h:29
TransactionId datfrozenxid
Definition: pg_database.h:40
TransactionId datminmxid
Definition: pg_database.h:41
int32 encoding
Definition: pg_database.h:33
FormData_pg_database
Definition: pg_database.h:47