Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
49.42. pg_shdepend
Prev UpChapter 49. System CatalogsHome Next

49.42. pg_shdepend

The catalogpg_shdepend records the dependency relationships between database objects and shared objects, such as roles. This information allowsPostgres Pro to ensure that those objects are unreferenced before attempting to delete them.

See alsopg_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 ofpg_shdepend per cluster, not one per database.

Table 49.42. pg_shdepend Columns

NameTypeReferencesDescription
dbidoidpg_database.oidThe OID of the database the dependent object is in, or zero for a shared object
classidoidpg_class.oidThe OID of the system catalog the dependent object is in
objidoidany OID columnThe OID of the specific dependent object
objsubidint4  For a table column, this is the column number (theobjid andclassid refer to the table itself). For all other object types, this column is zero.
refclassidoidpg_class.oidThe OID of the system catalog the referenced object is in (must be a shared catalog)
refobjidoidany OID columnThe OID of the specific referenced object
deptypechar  A code defining the specific semantics of this dependency relationship; see text

In all cases, apg_shdepend entry indicates that the referenced object cannot be dropped without also dropping the dependent object. However, there are several subflavors identified bydeptype:

SHARED_DEPENDENCY_OWNER (o)

The referenced object (which must be a role) is the owner of the dependent object.

SHARED_DEPENDENCY_ACL (a)

The referenced object (which must be a role) is mentioned in the ACL (access control list, i.e., privileges list) of the dependent object. (ASHARED_DEPENDENCY_ACL entry is not made for the owner of the object, since the owner will have aSHARED_DEPENDENCY_OWNER entry anyway.)

SHARED_DEPENDENCY_POLICY (r)

The referenced object (which must be a role) is mentioned as the target of a dependent policy object.

SHARED_DEPENDENCY_PIN (p)

There is no dependent object; this type of entry is a signal that the system itself depends on the referenced object, and so that object must never be deleted. Entries of this type are created only byinitdb. The columns for the dependent object contain zeroes.

Other dependency flavors might be needed in future. Note in particular that the current definition only supports roles as referenced objects.


Prev Up Next
49.41. pg_seclabel Home 49.43. pg_shdescription
pdfepub
Go to Postgres Pro Standard 9.5
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp