pg_shdepend
是一个记录各个数据库对象与集群范围共享对象(例如角色)之间依赖关系的 系统目录 表。
pg_shdepend
添加于 PostgreSQL 8.1。
此表在集群中的所有数据库之间共享。
按 PostgreSQL 版本定义
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