Home Explore Blog CI



postgresql

61th chunk of `doc/src/sgml/system-views.sgml`
41026c81abd1b61492e27c35bd7ccfd9a979af8e076644e00000000100000d0c


  <indexterm zone="view-pg-views">
   <primary>pg_views</primary>
  </indexterm>

  <para>
   The view <structname>pg_views</structname> provides access to
   useful information about each view in the database.
  </para>

  <table>
   <title><structname>pg_views</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>schemaname</structfield> <type>name</type>
       (references <link linkend="catalog-pg-namespace"><structname>pg_namespace</structname></link>.<structfield>nspname</structfield>)
      </para>
      <para>
       Name of schema containing view
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>viewname</structfield> <type>name</type>
       (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>relname</structfield>)
      </para>
      <para>
       Name of view
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>viewowner</structfield> <type>name</type>
       (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>rolname</structfield>)
      </para>
      <para>
       Name of view's owner
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>definition</structfield> <type>text</type>
      </para>
      <para>
       View definition (a reconstructed <xref linkend="sql-select"/> query)
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>


 <sect1 id="view-pg-wait-events">
  <title><structname>pg_wait_events</structname></title>

  <indexterm zone="view-pg-wait-events">
   <primary>pg_wait_events</primary>
  </indexterm>

  <para>
   The view <structname>pg_wait_events</structname> provides description about the
   wait events.
  </para>

  <table>
   <title><structname>pg_wait_events</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>type</structfield> <type>text</type>
      </para>
      <para>
       Wait event type
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>name</structfield> <type>text</type>
      </para>
      <para>
       Wait event name
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>description</structfield> <type>text</type>
      </para>
      <para>
       Wait event description
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

</chapter>

Title: System Views: pg_views and pg_wait_events
Summary
The pg_views view provides information about each view in the database, including schema name, view name, owner, and definition, while the pg_wait_events view describes wait events, including type, name, and description, offering insights into database activity and performance.