> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# System Catalogs

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

CockroachDB includes a set of system catalogs that provide non-stored data to client applications.

The following system catalogs are available as schemas preloaded to every database:

* <InternalLink path="information-schema">`information_schema`</InternalLink>, a schema provided for compatibility with the SQL standard.
* <InternalLink path="crdb-internal">`crdb_internal`</InternalLink>, a schema with information about CockroachDB internals.
* <InternalLink path="pg-catalog">`pg_catalog`</InternalLink>, a schema provided for compatibility with PostgreSQL.
* <InternalLink path="pg-extension">`pg_extension`</InternalLink>, a schema catalog with information about CockroachDB extensions.

Access to the `crdb_internal` schema and to tables and built-in functions in the `system` database is controlled by the <InternalLink path="session-variables">`allow_unsafe_internals` session variable</InternalLink>, which defaults to `off`. Queries to these namespaces will fail unless access is manually enabled. Usage is also audited via the <InternalLink path="logging-use-cases#example-unsafe-internals">`SENSITIVE_ACCESS` logging channel</InternalLink>. For more information, see <InternalLink path="crdb-internal#access-control">`crdb_internal` access control</InternalLink>. The `system` and `crdb_internal` schemas are intended for advanced support scenarios only, and should be accessed under the guidance of Cockroach Labs.

<Danger>
  Tables in the system catalogs have varying levels of stability. Not all system catalog tables are meant for programmatic purposes. For more information, see <InternalLink path="api-support-policy">API Support Policy</InternalLink>.
</Danger>

To see all of the system catalogs for the <InternalLink path="sql-name-resolution#current-database">current database</InternalLink>, you can use a <InternalLink path="show-schemas">`SHOW SCHEMAS`</InternalLink> statement:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW SCHEMAS;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
     schema_name     | owner
---------------------+--------
  crdb_internal      | NULL
  information_schema | NULL
  pg_catalog         | NULL
  pg_extension       | NULL
  public             | admin
(5 rows)
```

## See also

* <InternalLink path="show-vars">`SHOW`</InternalLink>
* <InternalLink path="show-schemas">`SHOW SCHEMAS`</InternalLink>
* <InternalLink path="sql-name-resolution">SQL Name Resolution</InternalLink>
