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 */
29CATALOG(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 */
35 NameData datname;
36
37 /* owner of database */
38 Oid datdba BKI_DEFAULT(PGUID);
39
40 /* character encoding */
41 int32 encoding;
42
43 /* LC_COLLATE setting */
44 NameData datcollate;
45
46 /* LC_CTYPE setting */
47 NameData datctype;
48
49 /* allowed as CREATE DATABASE template? */
50 bool datistemplate;
51
52 /* new connections allowed? */
53 bool datallowconn;
54
55 /* max connections allowed (-1=no limit) */
56 int32 datconnlimit;
57
58 /* highest OID to consider a system OID */
59 Oid datlastsysoid;
60
61 /* all Xids < this are frozen in this DB */
62 TransactionId datfrozenxid;
63
64 /* all multixacts in the DB are >= this */
65 TransactionId datminmxid;
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
74} FormData_pg_database;
75
76/* ----------------
77 * Form_pg_database corresponds to a pointer to a tuple with
78 * the format of pg_database relation.
79 * ----------------
80 */
81typedef FormData_pg_database *Form_pg_database;
82
83#endif /* PG_DATABASE_H */
84