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
47 } FormData_pg_database;
48 
49 /* ----------------
50  *		Form_pg_database corresponds to a pointer to a tuple with
51  *		the format of pg_database relation.
52  * ----------------
53  */
54 typedef FormData_pg_database *Form_pg_database;
55 
56 #endif							/* PG_DATABASE_H */
57