Download PDFSubmit Feedback

  • Privileges
  • pg_catalog.pg_database

pg_catalog

The pg_catalog schema in KWDB provides PostgreSQL compatibility.

To list all system views in the pg_catalog schema, use SHOW TABLES FROM [<database_name>.]pg_catalog;. If no database is specified, the current database is used by default. To view data from specific system views, use standard SELECT statements.

This section covers the most commonly used system views in the pg_catalog schema.

Privileges

The user must be a member of the admin role. By default, the root user belongs to the admin role.

pg_catalog.pg_database

The pg_catalog.pg_database system view describes database information in the cluster.

Column NameData TypeDescription
oidOIDThe database object identifier.
datnameNAMEThe database name.
datdbaOIDThe database owner.
databatypeSTRINGThe database type.
encodingINT4The character encoding.
datcollateSTRINGThe collation order.
datctypeSTRINGThe character type.
datistemplateBOOLWhether the database is a template.
datallowconnBOOLWhether new connections are allowed.
datconnlimitINT4Maximum concurrent connections
datlastsysoidOIDThe last system object ID.
datfrozenxidINT8The frozen transaction ID.
datminmxidINT8The minimum multitransaction ID.
dattablespaceOIDThe default tablespace.
dataclSTRING[]The access privileges.
datstatementSTRINGThe database creation statement.