4 The catalog pg_database stores information about the available
5 databases. Databases are created with the CREATE DATABASE command.
6 Consult Chapter 22 for details about the meaning of some of the
9 Unlike most system catalogs, pg_database is shared across all databases
10 of a cluster: there is only one copy of pg_database per cluster, not
13 Table 52.15. pg_database Columns
27 datdba oid (references pg_authid.oid)
29 Owner of the database, usually the user who created it
33 Character encoding for this database (pg_encoding_to_char() can
34 translate this number to the encoding name)
38 Locale provider for this database: b = builtin, c = libc, i = icu
42 If true, then this database can be cloned by any user with CREATEDB
43 privileges; if false, then only superusers or the owner of the database
48 If false then no one can connect to this database. This is used to
49 protect the template0 database from being altered.
53 Indicates that there are login event triggers defined for this
54 database. This flag is used to avoid extra lookups on the
55 pg_event_trigger table during each backend startup. This flag is used
56 internally by PostgreSQL and should not be manually altered or read for
61 Sets maximum number of concurrent connections that can be made to this
62 database. -1 means no limit, -2 indicates the database is invalid.
66 All transaction IDs before this one have been replaced with a permanent
67 (“frozen”) transaction ID in this database. This is used to track
68 whether the database needs to be vacuumed in order to prevent
69 transaction ID wraparound or to allow pg_xact to be shrunk. It is the
70 minimum of the per-table pg_class.relfrozenxid values.
74 All multixact IDs before this one have been replaced with a transaction
75 ID in this database. This is used to track whether the database needs
76 to be vacuumed in order to prevent multixact ID wraparound or to allow
77 pg_multixact to be shrunk. It is the minimum of the per-table
78 pg_class.relminmxid values.
80 dattablespace oid (references pg_tablespace.oid)
82 The default tablespace for the database. Within this database, all
83 tables for which pg_class.reltablespace is zero will be stored in this
84 tablespace; in particular, all the non-shared system catalogs will be
89 LC_COLLATE for this database
93 LC_CTYPE for this database
97 Collation provider locale name for this database. If the provider is
98 libc, datlocale is NULL; datcollate and datctype are used instead.
102 ICU collation rules for this database
106 Provider-specific version of the collation. This is recorded when the
107 database is created and then checked when it is used, to detect changes
108 in the collation definition that could lead to data corruption.
112 Access privileges; see Section 5.8 for details