Cloud

pg_database

The pg_database system catalog stores information about the databases available in the cluster. It mimics the pg_database PostgreSQL system catalog.

Columns

The following columns are available for querying in pg_database:

Column Type Description

oid

int

Object identifier for the database

datname

text

Database name

datdba

int

OID of the role that owns the database

encoding

int

Character encoding ID for the database (6 = UTF-8)

datlocprovider

text

Locale provider

datistemplate

bool

Whether this is a template database

datallowconn

bool

Whether connections to this database are allowed

datconnlimit

int

Connection limit (-1 means no limit)

datfrozenxid

int

Frozen transaction ID

datminmxid

int

Minimum multixact ID

dattablespace

int

OID of the default tablespace for the database

datcollate

text

LC_COLLATE setting for the database

datctype

text

LC_CTYPE setting for the database

daticulocale

text

ICU locale for the database

daticurules

text

ICU rules for the database

datcollversion

text

Collation version string

datacl

text

Access privileges

Examples

SELECT datname, encoding, datallowconn FROM pg_database;