Home Explore Blog CI



postgresql

1st chunk of `doc/src/sgml/system-views.sgml`
b11898830ae90ba4bbe7099bee624adc41eba03cdbe1cd5b0000000100000fa6
<!-- doc/src/sgml/system-views.sgml -->
<!--
 Documentation of the system views, directed toward PostgreSQL developers
 -->

<chapter id="views">
 <title>System Views</title>

  <para>
   In addition to the system catalogs, <productname>PostgreSQL</productname>
   provides a number of built-in views.  Some system views provide convenient
   access to some commonly used queries on the system catalogs.  Other views
   provide access to internal server state.
  </para>

  <para>
   The information schema (<xref linkend="information-schema"/>) provides
   an alternative set of views which overlap the functionality of the system
   views.  Since the information schema is SQL-standard whereas the views
   described here are <productname>PostgreSQL</productname>-specific,
   it's usually better to use the information schema if it provides all
   the information you need.
  </para>

  <para>
   <xref linkend="view-table"/> lists the system views described here.
   More detailed documentation of each view follows below.
   There are some additional views that provide access to accumulated
   statistics; they are described in
   <xref linkend="monitoring-stats-views-table"/>.
  </para>

 <sect1 id="views-overview">
  <title>Overview</title>

  <para>
   <xref linkend="view-table"/> lists the system views.
   More detailed documentation of each catalog follows below.
   Except where noted, all the views described here are read-only.
  </para>

  <table id="view-table">
   <title>System Views</title>

   <tgroup cols="2">
    <thead>
     <row>
      <entry>View Name</entry>
      <entry>Purpose</entry>
     </row>
    </thead>

    <tbody>
     <row>
      <entry><link linkend="view-pg-aios"><structname>pg_aios</structname></link></entry>
      <entry>In-use asynchronous IO handles</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-available-extensions"><structname>pg_available_extensions</structname></link></entry>
      <entry>available extensions</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-available-extension-versions"><structname>pg_available_extension_versions</structname></link></entry>
      <entry>available versions of extensions</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-backend-memory-contexts"><structname>pg_backend_memory_contexts</structname></link></entry>
      <entry>backend memory contexts</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-config"><structname>pg_config</structname></link></entry>
      <entry>compile-time configuration parameters</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-cursors"><structname>pg_cursors</structname></link></entry>
      <entry>open cursors</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-file-settings"><structname>pg_file_settings</structname></link></entry>
      <entry>summary of configuration file contents</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-group"><structname>pg_group</structname></link></entry>
      <entry>groups of database users</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-hba-file-rules"><structname>pg_hba_file_rules</structname></link></entry>
      <entry>summary of client authentication configuration file contents</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-ident-file-mappings"><structname>pg_ident_file_mappings</structname></link></entry>
      <entry>summary of client user name mapping configuration file contents</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-indexes"><structname>pg_indexes</structname></link></entry>
      <entry>indexes</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-locks"><structname>pg_locks</structname></link></entry>
      <entry>locks currently held or awaited</entry>
     </row>

     <row>
      <entry><link linkend="view-pg-matviews"><structname>pg_matviews</structname></link></entry>
      <entry>materialized

Title: System Views in PostgreSQL
Summary
PostgreSQL provides built-in system views that offer convenient access to system catalogs and internal server state, including views for system configuration, user management, and performance monitoring, with some views being read-only and others providing access to accumulated statistics.