pg_namespace — PostgreSQL system catalog

The PostgreSQL pg_namespace system catalog: full column reference (names, types, descriptions), catalog relationships and version support.

Summary

The catalog pg_namespace stores namespaces. A namespace is the structure underlying SQL schemas: each namespace can have a separate collection of relations, types, etc. without name conflicts.

(Description quoted from the official PostgreSQL documentation.)

Columns

The pg_namespace system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):

  • oid oid
    Row identifier
  • nspname name
    Name of the namespace
  • nspowner oid references pg_authid.oid
    Owner of the namespace
  • nspacl aclitem[]
    Access privileges; see ddl_priv for details

Related catalogs

This object references the following other system catalogs:

Version applicability

Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.

Related & references

Reference: PostgreSQL documentation — pg_namespace.