数据库的对象(用户,模式,表,视图,索引,类型等)之间只有依赖关系的,比如某些表示属于某个用户的,索引是在某个表上等。Postgresql的对象依赖关系记录在pg_depend表中
表定义
postgres=# \d pg_depend
Table "pg_catalog.pg_depend"
Column | Type | Modifiers
-------------+---------+-----------
classid | oid | not null
objid | oid | not null
objsubid | integer | not null
refclassid | oid | not null
refobjid | oid | not null
refobjsubid | integer | not null
deptype | "char" | not null
Indexes:
"pg_depend_depender_index" btree (classid, objid, objsubid)
"pg_depend_reference_index" btree (refclassid, refobjid, refobjsubid)
字段说明
classid 有倚赖对象所在系统表的 OID
objid 指定的有依赖对象的 OID