pg_depend
The catalog pg_depend records the dependency relationships between database objects. This information allows DROP commands to find which other objects must be dropped by DROP CASCADE or prevent dropping in the DROP RESTRICT case. See also pg_shdepend, which performs a similar function for dependencies involving objects that are shared across a database cluster.
English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- kind
- catalog
- lang
- en
- measured attributes
- true
- metadata release
- 18.6
- runtime columns
- classid, objid, objsubid, refclassid, refobjid, refobjsubid, deptype
- runtime verified
- false
- source
- english-manual
Definition PG 18
The catalog pg_depend records the dependency relationships between database objects. This information allows DROP commands to find which other objects must be dropped by DROP CASCADE or prevent dropping in the DROP RESTRICT case. See also pg_shdepend, which performs a similar function for dependencies involving objects that are shared across a database cluster.
Catalog columns
| Column | Type | Nullability | Description |
|---|---|---|---|
| classid | oid | Not null | The OID of the system catalog the dependent object is in |
| objid | oid | Not null | The OID of the specific dependent object |
| objsubid | int4 | Not null | For a table column, this is the column number (the objid and classid refer to the table itself). For all other object types, this column is zero. |
| refclassid | oid | Not null | The OID of the system catalog the referenced object is in |
| refobjid | oid | Not null | The OID of the specific referenced object |
| refobjsubid | int4 | Not null | For a table column, this is the column number (the refobjid and refclassid refer to the table itself). For all other object types, this column is zero. |
| deptype | char | Not null | A code defining the specific semantics of this dependency relationship; see text |
Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · catalog-bilingual-repair:639488c679d0fc25d88fbb3f821a31e702307187449e8c2276a8f9eaf8147474
Text language: en · catalog-bilingual-repair:639488c679d0fc25d88fbb3f821a31e702307187449e8c2276a8f9eaf8147474