pg_shdepend 是一个 系统目录 表,记录了单个数据库对象与集群范围内的共享对象(例如角色)之间的依赖关系。
pg_shdepend 在 PostgreSQL 8.1 中被添加。
该表在集群的所有数据库之间共享。
按 PostgreSQL 版本定义
pg_shdepend (PostgreSQL 19)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 18)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 17)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 16)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 15)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 14)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 13)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 12)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 11)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 10)
Table "pg_catalog.pg_shdepend"
Column | Type | Collation | Nullable | Default
------------+---------+-----------+----------+---------
dbid | oid | | not null |
classid | oid | | not null |
objid | oid | | not null |
objsubid | integer | | not null |
refclassid | oid | | not null |
refobjid | oid | | not null |
deptype | "char" | | not null |
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 9.6)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+---------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 9.5)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+---------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 9.4)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+---------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 9.3)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+---------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 9.2)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+---------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 9.1)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+---------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 9.0)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+---------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 8.4)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+---------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid, objsubid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 8.3)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+--------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
pg_shdepend (PostgreSQL 8.2)
Table "pg_catalog.pg_shdepend"
Column | Type | Modifiers
------------+--------+-----------
dbid | oid | not null
classid | oid | not null
objid | oid | not null
refclassid | oid | not null
refobjid | oid | not null
deptype | "char" | not null
Indexes:
"pg_shdepend_depender_index" btree (dbid, classid, objid), tablespace "pg_global"
"pg_shdepend_reference_index" btree (refclassid, refobjid), tablespace "pg_global"
Tablespace: "pg_global"
文档: pg_shdepend
变更历史
- PostgreSQL 8.4
- 添加了列
objsubid(提交 3cb5d658)
- 添加了列
- PostgreSQL 8.1
- 添加 (提交 59d1b3d9)
参考资料
- PostgreSQL 文档: pg_shdepend
