Information Schema
The information_schema namespace provides SQL-standard views over database object metadata. Use these views to inspect catalogs, tables, schemas, columns, 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 and views visible to the current role. |
|
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 and views visible to the current role. |
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';