Home Explore Blog CI



postgresql

37th chunk of `doc/src/sgml/information_schema.sgml`
73683337b91e916d310128bd46d1dd09c7bb9942bf4013020000000100000fa2
 the currently
   <quote>enabled roles</quote>.  The enabled roles are recursively
   defined as the current user together with all roles that have been
   granted to the enabled roles with automatic inheritance.  In other
   words, these are all roles that the current user has direct or
   indirect, automatically inheriting membership in.
   <indexterm><primary>enabled role</primary></indexterm>
   <indexterm><primary>role</primary><secondary>enabled</secondary></indexterm>
  </para>

  <para>
   For permission checking, the set of <quote>applicable roles</quote>
   is applied, which can be broader than the set of enabled roles.  So
   generally, it is better to use the view
   <literal>applicable_roles</literal> instead of this one; See
   <xref linkend="infoschema-applicable-roles"/> for details on
   <literal>applicable_roles</literal> view.
  </para>

  <table>
   <title><structname>enabled_roles</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>role_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of a role
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-foreign-data-wrapper-options">
  <title><literal>foreign_data_wrapper_options</literal></title>

  <para>
   The view <literal>foreign_data_wrapper_options</literal> contains
   all the options defined for foreign-data wrappers in the current
   database.  Only those foreign-data wrappers are shown that the
   current user has access to (by way of being the owner or having
   some privilege).
  </para>

  <table>
   <title><structname>foreign_data_wrapper_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>foreign_data_wrapper_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that the foreign-data wrapper is defined in (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>foreign_data_wrapper_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the foreign-data wrapper
      </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
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-foreign-data-wrappers">
  <title><literal>foreign_data_wrappers</literal></title>

  <para>
   The view <literal>foreign_data_wrappers</literal> contains all
   foreign-data wrappers defined in the current database.  Only those
   foreign-data wrappers are shown that the current user has access to
   (by way of being the owner or having some privilege).
  </para>

  <table>
   <title><structname>foreign_data_wrappers</structname> Columns</title>
   <tgroup cols="1">
    <thead>
     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       Column Type
      </para>

Title: Information Schema: Views for Roles and Foreign Data
Summary
The information schema contains views such as enabled_roles, foreign_data_wrapper_options, and foreign_data_wrappers, which provide information about the current user's roles, foreign-data wrapper options, and foreign-data wrappers in the database, respectively, with access restricted to the current user's privileges.