Home Explore Blog CI



postgresql

42th chunk of `doc/src/sgml/information_schema.sgml`
9a77ec94183abaedb1f8f84a4baf7ef06a82f44c9dd72ce60000000100000fa6
 current user
   has access to, by way of being the owner or having some privilege.
  </para>

  <table>
   <title><structname>key_column_usage</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 that contains 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 that contains 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>table_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that contains the table that contains the
       column that is restricted by this constraint (always the
       current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>table_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema that contains the table that contains the
       column that is restricted by this constraint
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>table_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the table that contains the column that is restricted
       by this constraint
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>column_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the column that is restricted by this constraint
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>ordinal_position</structfield> <type>cardinal_number</type>
      </para>
      <para>
       Ordinal position of the column within the constraint key (count
       starts at 1)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>position_in_unique_constraint</structfield> <type>cardinal_number</type>
      </para>
      <para>
       For a foreign-key constraint, ordinal position of the referenced
       column within its unique constraint (count starts at 1);
       otherwise null
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-parameters">
  <title><literal>parameters</literal></title>

  <para>
   The view <literal>parameters</literal> contains information about
   the parameters (arguments) of all functions in the current database.
   Only those functions are shown that the current user has access to
   (by way of being the owner or having some privilege).
  </para>

  <table>
   <title><structname>parameters</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>

Title: Information Schema: Key Column Usage and Parameters
Summary
This section describes two information schema views: key_column_usage, which lists columns restricted by constraints such as unique, primary key, or foreign key, and parameters, which contains information about function parameters in the current database, with both views only showing data accessible to the current user, detailing their columns and data types.