pg_shdepend
The catalog pg_shdepend records the dependency relationships between database objects and shared objects, such as roles. This information allows PostgreSQL to ensure that those objects are unreferenced before attempting to delete them. See also pg_depend, which performs a similar function for dependencies involving objects within a single database. Unlike most system catalogs, pg_shdepend is shared across all databases of a cluster: there is only one copy of pg_shdepend per cluster, not one per database.
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
- dbid, classid, objid, objsubid, refclassid, refobjid, deptype
- runtime verified
- false
- source
- english-manual
Definition PG 18
The catalog pg_shdepend records the dependency relationships between database objects and shared objects, such as roles. This information allows PostgreSQL to ensure that those objects are unreferenced before attempting to delete them. See also pg_depend, which performs a similar function for dependencies involving objects within a single database. Unlike most system catalogs, pg_shdepend is shared across all databases of a cluster: there is only one copy of pg_shdepend per cluster, not one per database.
Catalog columns
| Column | Type | Nullability | Description |
|---|---|---|---|
| dbid | oid | Not null | The OID of the database the dependent object is in, or zero for a shared object |
| 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 (must be a shared catalog) |
| refobjid | oid | Not null | The OID of the specific referenced object |
| 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:115fe90189259b1042415f11503b5f5d55ea5e96625ebe2f19e01e0c05f9b9dd
Text language: en · catalog-bilingual-repair:115fe90189259b1042415f11503b5f5d55ea5e96625ebe2f19e01e0c05f9b9dd