Home Explore Blog CI



postgresql

92th chunk of `doc/src/sgml/information_schema.sgml`
b3930a2ac0b0eb9620a3c1e259cfbe2e18713b4044784ad30000000100000fb1
 <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 contains the
       column 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 contains the
       column 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 contains the column that is used by the
       view
      </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 used by the view
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-view-routine-usage">
  <title><literal>view_routine_usage</literal></title>

  <para>
   The view <literal>view_routine_usage</literal> identifies all
   routines (functions and procedures) that are used in the query
   expression of a view (the <command>SELECT</command> statement that
   defines the view).  A routine is only included if that routine is
   owned by a currently enabled role.
  </para>

  <table>
   <title><structname>view_routine_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>table_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database containing 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 containing 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 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>

Title: Information Schema Views: View Column Usage and View Routine Usage
Summary
The information schema includes views like view_column_usage, which identifies columns used in view query expressions, and view_routine_usage, which identifies routines used in view query expressions, with details on the database, schema, view, and routine names, and only includes items owned by currently enabled roles.