Information Schema
The information_schema namespace provides SQL-standard views over database object metadata. Use these views to inspect tables, columns, schemas, Redpanda catalogs and Iceberg catalogs, and privilege grants without querying the underlying PostgreSQL system catalogs directly.
Available views
Standard views follow the SQL specification, with semantics consistent with PostgreSQL’s information_schema. Redpanda SQL also adds one extension view for per-relation EXTERNAL SOURCE grants.
| View | Description |
|---|---|
|
Character sets available in the current database. |
|
Columns of tables visible to the current role, including tables in Redpanda catalogs and Iceberg catalogs. Does not include columns of views. |
|
The two data sources that Redpanda SQL reads from: |
|
Redpanda catalogs and Iceberg catalogs visible to the current role. See Tables in Redpanda and Iceberg catalogs. |
|
Tables in Redpanda catalogs and Iceberg catalogs visible to the current role, with the catalog that each table belongs to. See Tables in Redpanda and Iceberg catalogs. |
|
Columns constrained as keys (primary keys, unique constraints, foreign keys). |
|
Foreign-key constraints visible to the current role. |
|
Per-relation EXTERNAL SOURCE grants. Redpanda SQL extension that captures grants whose stored relation pattern is anything other than |
|
Privileges granted on tables and table-like objects to the current role. |
|
USAGE privileges granted to the current role. |
|
Table constraints (primary key, unique, foreign key, check) visible to the current role. |
|
Tables visible to the current role. Tables in Redpanda catalogs and Iceberg catalogs have the |
Tables in Redpanda and Iceberg catalogs
Redpanda SQL lists tables in Redpanda catalogs and Iceberg catalogs as foreign tables, with the same model that PostgreSQL uses for foreign data:
-
Each catalog is a foreign server. The server name is the catalog name, such as
default_redpanda_catalog. -
Each server uses one of two foreign data wrappers:
redpandafor Redpanda catalogs, oricebergfor Iceberg catalogs. -
Each table in a catalog is a foreign table.
These tables appear in information_schema.tables with the table_type value FOREIGN, and their columns appear in information_schema.columns. To find the catalog that a table belongs to, query information_schema.foreign_tables.
In Redpanda Cloud, you can’t query a table in an Iceberg catalog directly. Query the topic’s table in the Redpanda catalog instead. See Query Iceberg-enabled topics.
The table_name value does not include the catalog name. For a table in an Iceberg catalog, the value includes the Iceberg namespace, such as redpanda.orders. For a topic-backed table in a Redpanda catalog, the value is the table name, such as orders.
Before Redpanda commits a topic’s first data to Iceberg, these views can already list the topic’s table in the Iceberg catalog, such as redpanda.accounts. The Iceberg table does not exist yet. Queries on the topic’s table in the Redpanda catalog are not affected.
Deleting a topic does not remove its tables from these views. To remove a table, run DROP TABLE <catalog>⇒<table>.
To see a catalog or a table in a catalog in these views, a role needs CONNECT on the database. The role also needs one of the following:
-
USAGEon the schema that holds the catalog. -
Ownership of the catalog or the table. See ALTER … OWNER TO.
A GRANT … ON EXTERNAL SOURCE grant does not make a catalog or a table visible without USAGE. A role that can query a table in a catalog already has USAGE, so the role can also see the table. See GRANT.
The same rules apply to the pg_foreign_server, pg_foreign_table, and pg_class system catalogs.
information_schema.foreign_data_wrappers
| Column | Type | Nullable | Description |
|---|---|---|---|
|
|
No |
Database that the foreign data wrapper belongs to. |
|
|
No |
Name of the foreign data wrapper: |
|
|
No |
Unused. This column is always empty. |
|
|
No |
Unused. This column is always empty. |
|
|
No |
Unused. This column is always |
information_schema.foreign_servers
| Column | Type | Nullable | Description |
|---|---|---|---|
|
|
No |
Database that the catalog belongs to. |
|
|
No |
Name of the Redpanda catalog or Iceberg catalog. |
|
|
No |
Database that the foreign data wrapper belongs to. |
|
|
No |
Foreign data wrapper that the catalog uses: |
|
|
No |
Unused. This column is always empty. |
|
|
No |
Unused. This column is always empty. |
|
|
No |
Unused. This column is always empty. |
information_schema.foreign_tables
| Column | Type | Nullable | Description |
|---|---|---|---|
|
|
No |
Database that the table belongs to. |
|
|
No |
Schema that holds the catalog that the table belongs to. |
|
|
No |
Name of the table. Uses the same format as |
|
|
No |
Database that the catalog belongs to. |
|
|
No |
Name of the Redpanda catalog or Iceberg catalog that the table belongs to. |
List each table in a catalog, with its catalog and data source:
SELECT ft.foreign_server_name, s.foreign_data_wrapper_name, ft.foreign_table_name
FROM information_schema.foreign_tables ft
JOIN information_schema.foreign_servers s
ON s.foreign_server_name = ft.foreign_server_name
ORDER BY 1, 3;
information_schema.role_external_relation_grants
Per-relation EXTERNAL SOURCE grants. Rows whose stored relation pattern is anything other than *. Catalog-level EXTERNAL SOURCE grants (stored pattern \*) surface in information_schema.role_table_grants, like foreign-table grants in PostgreSQL.
When you GRANT … ON EXTERNAL SOURCE catalog_name ⇒ 'pattern', the pattern is stored verbatim. Redpanda SQL does not normalize or canonicalize it. Patterns are either a fully-qualified relation name like ns1.ns2.my_table or a name with a trailing wildcard like ns1.public_tables*. See GRANT for the full grant syntax and Manage access to Redpanda SQL for the access model.
Visibility mirrors information_schema.role_table_grants. A regular role sees rows where it is the grantee. A superuser sees grants for every non-superuser.
Use this view to find the exact stored relation pattern when you need to revoke a grant. REVOKE requires the pattern argument to match a stored grant exactly. Revoking a pattern that was never granted returns an error, so query this view first to see what’s currently registered.
| Column | Type | Nullable | Description |
|---|---|---|---|
|
|
No |
Role that granted the privilege. |
|
|
No |
Role that holds the privilege. |
|
|
No |
Database the grant applies to. |
|
|
No |
Schema the grant applies to. |
|
|
No |
External source (catalog or storage) the grant applies to. |
|
|
No |
Relation-name pattern the grant matches. Wildcards ( |
|
|
No |
Privilege granted, such as |
|
|
No |
|
SELECT grantee, source_name, relation_pattern, privilege_type
FROM information_schema.role_external_relation_grants
WHERE grantee = 'analyst';