Home Explore Blog CI



postgresql

59th chunk of `doc/src/sgml/system-views.sgml`
e097e2a19b7a31c432486d2ac02a2574102d556c68f05fe60000000100000e83
 </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>useconfig</structfield> <type>text[]</type>
      </para>
      <para>
       Session defaults for run-time configuration variables
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect1>

 <sect1 id="view-pg-user-mappings">
  <title><structname>pg_user_mappings</structname></title>

  <indexterm zone="view-pg-user-mappings">
   <primary>pg_user_mappings</primary>
  </indexterm>

  <para>
   The view <structname>pg_user_mappings</structname> provides access
   to information about user mappings.  This is essentially a publicly
   readable view of
   <link linkend="catalog-pg-user-mapping"><structname>pg_user_mapping</structname></link>
   that leaves out the options field if the user has no rights to use
   it.
  </para>

  <table>
   <title><structname>pg_user_mappings</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>umid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-user-mapping"><structname>pg_user_mapping</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the user mapping
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>srvid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-foreign-server"><structname>pg_foreign_server</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the foreign server that contains this mapping
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>srvname</structfield> <type>name</type>
       (references <link linkend="catalog-pg-foreign-server"><structname>pg_foreign_server</structname></link>.<structfield>srvname</structfield>)
      </para>
      <para>
       Name of the foreign server
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>umuser</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the local role being mapped, 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
    

Title: System View: pg_user_mappings
Summary
The pg_user_mappings view provides information about user mappings, including the OID of the user mapping, foreign server OID and name, local role OID, local user name, and user mapping specific options, with access to certain fields restricted to protect password information.