Home Explore Blog CI



postgresql

77th chunk of `doc/src/sgml/information_schema.sgml`
c179b2e2b776f4e644295a5ffe4674a4e61fa7bc406642880000000100000faf
 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 (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
      </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
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>privilege_type</structfield> <type>character_data</type>
      </para>
      <para>
       Type of the privilege: <literal>SELECT</literal>,
       <literal>INSERT</literal>, <literal>UPDATE</literal>,
       <literal>DELETE</literal>, <literal>TRUNCATE</literal>,
       <literal>REFERENCES</literal>, or <literal>TRIGGER</literal>
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>is_grantable</structfield> <type>yes_or_no</type>
      </para>
      <para>
       <literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>with_hierarchy</structfield> <type>yes_or_no</type>
      </para>
      <para>
       In the SQL standard, <literal>WITH HIERARCHY OPTION</literal>
       is a separate (sub-)privilege allowing certain operations on
       table inheritance hierarchies.  In PostgreSQL, this is included
       in the <literal>SELECT</literal> privilege, so this column
       shows <literal>YES</literal> if the privilege
       is <literal>SELECT</literal>, else <literal>NO</literal>.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

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

  <para>
   The view <literal>tables</literal> contains all tables and views
   defined in the current database.  Only those tables and views are
   shown that the current user has access to (by way of being the
   owner or having some privilege).
  </para>

  <table>
   <title><structname>tables</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 table (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>table_schema</structfield>

Title: Information Schema: Table Privileges and Tables
Summary
This section describes the table_privileges view in the information schema, which contains information about privileges granted on tables or views, and the tables view, which lists all tables and views defined in the current database that the current user has access to, including columns for grantor, grantee, table name, privilege type, and more.