Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
[PostgreSQL.git] / src / include / catalog / pg_database.h
blob8eaa04f4cfb5d88e6e70526fe6e1cd0ed7d7b66b
1 /*-------------------------------------------------------------------------
3 * pg_database.h
4 * definition of the system "database" relation (pg_database)
5 * along with the relation's initial contents.
8 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * $PostgreSQL$
13 * NOTES
14 * the genbki.sh script reads this file and generates .bki
15 * information from the DATA() statements.
17 *-------------------------------------------------------------------------
19 #ifndef PG_DATABASE_H
20 #define PG_DATABASE_H
22 #include "catalog/genbki.h"
24 /* ----------------
25 * pg_database definition. cpp turns this into
26 * typedef struct FormData_pg_database
27 * ----------------
29 #define DatabaseRelationId 1262
31 CATALOG(pg_database,1262) BKI_SHARED_RELATION
33 NameData datname; /* database name */
34 Oid datdba; /* owner of database */
35 int4 encoding; /* character encoding */
36 NameData datcollate; /* LC_COLLATE setting */
37 NameData datctype; /* LC_CTYPE setting */
38 bool datistemplate; /* allowed as CREATE DATABASE template? */
39 bool datallowconn; /* new connections allowed? */
40 int4 datconnlimit; /* max connections allowed (-1=no limit) */
41 Oid datlastsysoid; /* highest OID to consider a system OID */
42 TransactionId datfrozenxid; /* all Xids < this are frozen in this DB */
43 Oid dattablespace; /* default table space for this DB */
44 text datconfig[1]; /* database-specific GUC (VAR LENGTH) */
45 aclitem datacl[1]; /* access permissions (VAR LENGTH) */
46 } FormData_pg_database;
48 /* ----------------
49 * Form_pg_database corresponds to a pointer to a tuple with
50 * the format of pg_database relation.
51 * ----------------
53 typedef FormData_pg_database *Form_pg_database;
55 /* ----------------
56 * compiler constants for pg_database
57 * ----------------
59 #define Natts_pg_database 13
60 #define Anum_pg_database_datname 1
61 #define Anum_pg_database_datdba 2
62 #define Anum_pg_database_encoding 3
63 #define Anum_pg_database_datcollate 4
64 #define Anum_pg_database_datctype 5
65 #define Anum_pg_database_datistemplate 6
66 #define Anum_pg_database_datallowconn 7
67 #define Anum_pg_database_datconnlimit 8
68 #define Anum_pg_database_datlastsysoid 9
69 #define Anum_pg_database_datfrozenxid 10
70 #define Anum_pg_database_dattablespace 11
71 #define Anum_pg_database_datconfig 12
72 #define Anum_pg_database_datacl 13
74 DATA(insert OID = 1 ( template1 PGUID ENCODING "LC_COLLATE" "LC_CTYPE" t t -1 0 0 1663 _null_ _null_));
75 SHDESCR("default template database");
76 #define TemplateDbOid 1
78 #endif /* PG_DATABASE_H */