Home Explore Blog CI



postgresql

15th chunk of `doc/src/sgml/information_schema.sgml`
25763f10feda73b4b1e7154b7836d34e7432761c6f1f2d030000000100000fac
 options defined for foreign table columns in the current database.  Only
   those foreign table columns are shown that the current user has access to
   (by way of being the owner or having some privilege).
  </para>

  <table>
   <title><structname>column_options</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>table_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that contains the foreign table (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 foreign table
      </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 foreign table
      </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
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>option_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of an option
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>option_value</structfield> <type>character_data</type>
      </para>
      <para>
       Value of the option
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-column-privileges">
  <title><literal>column_privileges</literal></title>

  <para>
   The view <literal>column_privileges</literal> identifies all
   privileges granted on columns to a currently enabled role or by a
   currently enabled role.  There is one row for each combination of
   column, grantor, and grantee.
  </para>

  <para>
   If a privilege has been granted on an entire table, it will show up in
   this view as a grant for each column, but only for the
   privilege types where column granularity is possible:
   <literal>SELECT</literal>, <literal>INSERT</literal>,
   <literal>UPDATE</literal>, <literal>REFERENCES</literal>.
  </para>

  <table>
   <title><structname>column_privileges</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>grantor</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the role that granted the privilege
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>grantee</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the role that the privilege was granted to
      </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 (always the current database)
      </para></entry>

Title: Information Schema Views for Column Options and Column Privileges
Summary
This section describes two Information Schema views: column_options, which contains options defined for foreign table columns, and column_privileges, which identifies all privileges granted on columns to a currently enabled role or by a currently enabled role, with details on the columns and descriptions of each view.