Home Explore Blog CI



postgresql

93th chunk of `doc/src/sgml/information_schema.sgml`
ebea344512ecc0fd9ff6e928172a368bb52762c4f04f48190000000100000f7e
 </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 view
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>specific_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database containing the function (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>specific_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema containing the function
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>specific_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       The <quote>specific name</quote> of the function.  See <xref linkend="infoschema-routines"/> for more information.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-view-table-usage">
  <title><literal>view_table_usage</literal></title>

  <para>
   The view <literal>view_table_usage</literal> identifies all tables
   that are used in the query expression of a view (the
   <command>SELECT</command> statement that defines the view).  A
   table is only included if that table is owned by a currently
   enabled role.
  </para>

  <note>
   <para>
    System tables are not included.  This should be fixed sometime.
   </para>
  </note>

  <table>
   <title><structname>view_table_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>view_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that contains the view (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>view_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema that contains the view
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>view_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the view
      </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 is
       used by the view (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 is used by the
       view
      </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 is used by the view
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

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

  <para>
   The view <literal>views</literal> contains all views defined

Title: Information Schema Views: View Routine Usage and View Table Usage
Summary
The information schema includes views like view_routine_usage, which identifies functions used in view query expressions, and view_table_usage, which identifies tables used in view query expressions, with details on the database, schema, view, and table names, and only includes items owned by currently enabled roles, excluding system tables.