</tbody>
</tgroup>
</table>
</sect1>
<sect1 id="infoschema-referential-constraints">
<title><literal>referential_constraints</literal></title>
<para>
The view <literal>referential_constraints</literal> contains all
referential (foreign key) constraints in the current database.
Only those constraints are shown for which the current user has
write access to the referencing table (by way of being the
owner or having some privilege other than <literal>SELECT</literal>).
</para>
<table>
<title><structname>referential_constraints</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>constraint_catalog</structfield> <type>sql_identifier</type>
</para>
<para>
Name of the database containing the constraint (always the current database)
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>constraint_schema</structfield> <type>sql_identifier</type>
</para>
<para>
Name of the schema containing the constraint
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>constraint_name</structfield> <type>sql_identifier</type>
</para>
<para>
Name of the constraint
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>unique_constraint_catalog</structfield> <type>sql_identifier</type>
</para>
<para>
Name of the database that contains the unique or primary key
constraint that the foreign key constraint references (always
the current database)
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>unique_constraint_schema</structfield> <type>sql_identifier</type>
</para>
<para>
Name of the schema that contains the unique or primary key
constraint that the foreign key constraint references
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>unique_constraint_name</structfield> <type>sql_identifier</type>
</para>
<para>
Name of the unique or primary key constraint that the foreign
key constraint references
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>match_option</structfield> <type>character_data</type>
</para>
<para>
Match option of the foreign key constraint:
<literal>FULL</literal>, <literal>PARTIAL</literal>, or
<literal>NONE</literal>.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>update_rule</structfield> <type>character_data</type>
</para>
<para>
Update rule of the foreign key constraint:
<literal>CASCADE</literal>, <literal>SET NULL</literal>,
<literal>SET DEFAULT</literal>, <literal>RESTRICT</literal>, or
<literal>NO ACTION</literal>.
</para></entry>
</row>
<row>
<entry role="catalog_table_entry"><para role="column_definition">
<structfield>delete_rule</structfield> <type>character_data</type>
</para>
<para>
Delete rule of the foreign key constraint:
<literal>CASCADE</literal>, <literal>SET NULL</literal>,
<literal>SET DEFAULT</literal>, <literal>RESTRICT</literal>, or
<literal>NO ACTION</literal>.
</para></entry>