Home Explore Blog CI



postgresql

53th chunk of `doc/src/sgml/information_schema.sgml`
fd34c5b6ead1683366a145214541e1251140991dbcde5ebb0000000100000fc9
 privilege is grantable, <literal>NO</literal> if not
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-role-usage-grants">
  <title><literal>role_usage_grants</literal></title>

  <para>
   The view <literal>role_usage_grants</literal> identifies
   <literal>USAGE</literal> privileges granted on various kinds of
   objects where the grantor or grantee is a currently enabled role.
   Further information can be found under
   <literal>usage_privileges</literal>.  The only effective difference
   between this view and <literal>usage_privileges</literal> is that
   this view omits objects that have been made accessible to the
   current user by way of a grant to <literal>PUBLIC</literal>.
  </para>

  <table>
   <title><structname>role_usage_grants</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>grantor</structfield> <type>sql_identifier</type>
      </para>
      <para>
       The name of the role that granted the privilege
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>grantee</structfield> <type>sql_identifier</type>
      </para>
      <para>
       The name of the role that the privilege was granted to
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>object_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database containing the object (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>object_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema containing the object, if applicable,
       else an empty string
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>object_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the object
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>object_type</structfield> <type>character_data</type>
      </para>
      <para>
       <literal>COLLATION</literal> or <literal>DOMAIN</literal> or <literal>FOREIGN DATA WRAPPER</literal> or <literal>FOREIGN SERVER</literal> or <literal>SEQUENCE</literal>
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>privilege_type</structfield> <type>character_data</type>
      </para>
      <para>
       Always <literal>USAGE</literal>
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>is_grantable</structfield> <type>yes_or_no</type>
      </para>
      <para>
       <literal>YES</literal> if the privilege is grantable, <literal>NO</literal> if not
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-routine-column-usage">
  <title><literal>routine_column_usage</literal></title>

  <para>
   The view <literal>routine_column_usage</literal> identifies all columns
   that are used by a function or procedure, either in the SQL body or in
   parameter default expressions.  (This only works for unquoted SQL bodies,
   not quoted bodies or functions in other languages.)  A column is only
   included if its table is owned by a currently enabled role.
  </para>

  <table>
   <title><literal>routine_column_usage</literal>

Title: Information Schema: Role Usage Grants and Routine Column Usage Views
Summary
This section describes the 'role_usage_grants' view, which identifies USAGE privileges granted on various kinds of objects, and begins to describe the 'routine_column_usage' view, which identifies columns used by functions or procedures, with details on the columns and types of data contained in these views.