involving objects
within a single database.
</para>
<para>
Unlike most system catalogs, <structname>pg_shdepend</structname>
is shared across all databases of a cluster: there is only one
copy of <structname>pg_shdepend</structname> per cluster, not
one per database.
</para>
<table>
<title><structname>pg_shdepend</structname> Columns</title>
<tgroup cols="1">
<thead>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
Column Type
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>dbid</structfield> <type>oid</type>
(references <link linkend="catalog-pg-database"><structname>pg_database</structname></link>.<structfield>oid</structfield>)
</para>
<para>
The OID of the database the dependent object is in,
or zero for a shared object
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>classid</structfield> <type>oid</type>
(references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
</para>
<para>
The OID of the system catalog the dependent object is in
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>objid</structfield> <type>oid</type>
(references any OID column)
</para>
<para>
The OID of the specific dependent object
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>objsubid</structfield> <type>int4</type>
</para>
<para>
For a table column, this is the column number (the
<structfield>objid</structfield> and <structfield>classid</structfield> refer to the
table itself). For all other object types, this column is zero.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>refclassid</structfield> <type>oid</type>
(references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
</para>
<para>
The OID of the system catalog the referenced object is in
(must be a shared catalog)
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>refobjid</structfield> <type>oid</type>
(references any OID column)
</para>
<para>
The OID of the specific referenced object
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>deptype</structfield> <type>char</type>
</para>
<para>
A code defining the specific semantics of this dependency relationship; see text
</para></entry>
</row>
</tbody>
</tgroup>
</table>
<para>
In all cases, a <structname>pg_shdepend</structname> entry indicates that
the referenced object cannot be dropped without also dropping the dependent
object. However, there are several subflavors identified by
<structfield>deptype</structfield>:
<variablelist>
<varlistentry>
<term><symbol>SHARED_DEPENDENCY_OWNER</symbol> (<literal>o</literal>)</term>
<listitem>
<para>
The referenced object (which must be a role) is the owner of the
dependent object.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><symbol>SHARED_DEPENDENCY_ACL</symbol> (<literal>a</literal>)</term>
<listitem>
<para>
The referenced object (which must be a role) is mentioned in the
<acronym>ACL</acronym> of the