Home Explore Blog CI



postgresql

90th chunk of `doc/src/sgml/information_schema.sgml`
1f93ad27e2cf7e419085a19a9d48f2ab696e00ac3ef91bf50000000100000fa4
 available in <productname>PostgreSQL</productname>
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>ref_dtd_identifier</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Applies to a feature not available in <productname>PostgreSQL</productname>
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-user-mapping-options">
  <title><literal>user_mapping_options</literal></title>

  <para>
   The view <literal>user_mapping_options</literal> contains all the
   options defined for user mappings in the current database.  Only
   those user mappings are shown where the current user has access to
   the corresponding foreign server (by way of being the owner or
   having some privilege).
  </para>

  <table>
   <title><structname>user_mapping_options</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>authorization_identifier</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the user being mapped,
       or <literal>PUBLIC</literal> if the mapping is public
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>foreign_server_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that the foreign server used by this
       mapping is defined in (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>foreign_server_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the foreign server used by this mapping
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>option_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of an option
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>option_value</structfield> <type>character_data</type>
      </para>
      <para>
       Value of the option.  This column will show as null
       unless the current user is the user being mapped, or the mapping
       is for <literal>PUBLIC</literal> and the current user is the
       server owner, or the current user is a superuser.  The intent is
       to protect password information stored as user mapping
       option.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-user-mappings">
  <title><literal>user_mappings</literal></title>

  <para>
   The view <literal>user_mappings</literal> contains all user
   mappings defined in the current database.  Only those user mappings
   are shown where the current user has access to the corresponding
   foreign server (by way of being the owner or having some
   privilege).
  </para>

  <table>
   <title><structname>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>authorization_identifier</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the user being mapped,
       or <literal>PUBLIC</literal> if the mapping

Title: Information Schema Views: User Mapping Options and User Mappings
Summary
The information schema contains views such as user_mapping_options and user_mappings, which provide metadata about user mappings in the current database, including options and mapping details, but only shows mappings accessible to the current user based on ownership or privileges.