Home Explore Blog CI



postgresql

60th chunk of `doc/src/sgml/system-views.sgml`
e775976ce119c98c9998ee91094ab473c06825b5c61af69f0000000100000949
 or zero if the user mapping is public
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>usename</structfield> <type>name</type>
      </para>
      <para>
       Name of the local user to be mapped
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>umoptions</structfield> <type>text[]</type>
      </para>
      <para>
       User mapping specific options, as <quote>keyword=value</quote> strings
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <para>
   To protect password information stored as a user mapping option,
   the <structfield>umoptions</structfield> column will read as null
   unless one of the following applies:
   <itemizedlist>
    <listitem>
     <para>
      current user is the user being mapped, and owns the server or
      holds <literal>USAGE</literal> privilege on it
     </para>
    </listitem>
    <listitem>
     <para>
      current user is the server owner and mapping is for <literal>PUBLIC</literal>
     </para>
    </listitem>
    <listitem>
     <para>
      current user is a superuser
     </para>
    </listitem>
   </itemizedlist>
  </para>

 </sect1>


 <sect1 id="view-pg-views">
  <title><structname>pg_views</structname></title>

  <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">

Title: System Views: pg_user_mappings and pg_views
Summary
The pg_user_mappings view provides information about user mappings, with restricted access to certain fields to protect password information, while the pg_views view offers details about each view in the database, including schema name and other relevant information.