↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / System Catalogs

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

ColumnTypeNullabilityDescription
classidoidNot nullThe OID of the system catalog the dependent object is in
objidoidNot nullThe OID of the specific dependent object
objsubidint4Not nullFor 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.
refclassidoidNot nullThe OID of the system catalog the referenced object is in
refobjidoidNot nullThe OID of the specific referenced object
refobjsubidint4Not nullFor 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.
deptypecharNot nullA 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