Home Explore Blog CI



postgresql

33th chunk of `doc/src/sgml/catalogs.sgml`
d94465f0943c45c5a02d34a4fae0f194bee8b03658e174c20000000100000fca
 linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       If a foreign key, the referenced table; else zero
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>confupdtype</structfield> <type>char</type>
      </para>
      <para>
       Foreign key update action code:
       <literal>a</literal> = no action,
       <literal>r</literal> = restrict,
       <literal>c</literal> = cascade,
       <literal>n</literal> = set null,
       <literal>d</literal> = set default
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>confdeltype</structfield> <type>char</type>
      </para>
      <para>
       Foreign key deletion action code:
       <literal>a</literal> = no action,
       <literal>r</literal> = restrict,
       <literal>c</literal> = cascade,
       <literal>n</literal> = set null,
       <literal>d</literal> = set default
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>confmatchtype</structfield> <type>char</type>
      </para>
      <para>
       Foreign key match type:
       <literal>f</literal> = full,
       <literal>p</literal> = partial,
       <literal>s</literal> = simple
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>conislocal</structfield> <type>bool</type>
      </para>
      <para>
       This constraint is defined locally for the relation.  Note that a
       constraint can be locally defined and inherited simultaneously.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>coninhcount</structfield> <type>int2</type>
      </para>
      <para>
       The number of direct inheritance ancestors this constraint has.
       A constraint with
       a nonzero number of ancestors cannot be dropped nor renamed.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>connoinherit</structfield> <type>bool</type>
      </para>
      <para>
       This constraint is defined locally for the relation.  It is a
       non-inheritable constraint.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>conperiod</structfield> <type>bool</type>
      </para>
      <para>
       This constraint is defined with <literal>WITHOUT OVERLAPS</literal>
       (for primary keys and unique constraints) or <literal>PERIOD</literal>
       (for foreign keys).
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>conkey</structfield> <type>int2[]</type>
       (references <link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.<structfield>attnum</structfield>)
      </para>
      <para>
       If a table constraint (including foreign keys, but not constraint
       triggers), list of the constrained columns
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>confkey</structfield> <type>int2[]</type>
       (references <link linkend="catalog-pg-attribute"><structname>pg_attribute</structname></link>.<structfield>attnum</structfield>)
      </para>
      <para>
       If a foreign key, list of the referenced columns
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>conpfeqop</structfield> <type>oid[]</type>
       (references <link linkend="catalog-pg-operator"><structname>pg_operator</structname></link>.<structfield>oid</structfield>)

Title: pg_constraint Catalog Columns (Continued)
Summary
This section describes more columns in the pg_constraint catalog table. It details columns related to foreign key actions (confupdtype, confdeltype, confmatchtype), inheritance (conislocal, coninhcount, connoinherit), period constraints (conperiod), and the constrained and referenced columns (conkey, confkey) for table and foreign key constraints.