# pg_database

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: pg_database
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/system-catalogs/catalogs/pg_database
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/system-catalogs/catalogs/pg_database.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/system-catalogs/catalogs/pg_database.adoc
description: The pg_database system catalog stores information about the databases available in the cluster.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/system-catalogs/catalogs/pg_database.md -->

The `pg_database` system catalog stores information about the databases available in the cluster. It mimics the [pg\_database](https://www.postgresql.org/docs/current/catalog-pg-database.html) PostgreSQL system catalog.

## [](#columns)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)Examples

```sql
SELECT datname, encoding, datallowconn FROM pg_database;
```