Home Explore Blog CI



postgresql

21th chunk of `doc/src/sgml/catalogs.sgml`
2849ad45dd301632830430c78d9bc81b8e6ecf099b5c0e7f0000000100000fa0
 <para>
       ID of the role that granted this membership
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>admin_option</structfield> <type>bool</type>
      </para>
      <para>
       True if <structfield>member</structfield> can grant membership in
       <structfield>roleid</structfield> to others
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>inherit_option</structfield> <type>bool</type>
      </para>
      <para>
       True if the member automatically inherits the privileges of the
       granted role
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>set_option</structfield> <type>bool</type>
      </para>
      <para>
       True if the member can
       <link linkend="sql-set-role"><command>SET ROLE</command></link>
       to the granted role
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect1>


 <sect1 id="catalog-pg-cast">
  <title><structname>pg_cast</structname></title>

  <indexterm zone="catalog-pg-cast">
   <primary>pg_cast</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_cast</structname> stores data type conversion
   paths, both built-in and user-defined.
  </para>

  <para>
   It should be noted that <structname>pg_cast</structname> does not represent
   every type conversion that the system knows how to perform; only those that
   cannot be deduced from some generic rule.  For example, casting between a
   domain and its base type is not explicitly represented in
   <structname>pg_cast</structname>.  Another important exception is that
   <quote>automatic I/O conversion casts</quote>, those performed using a data
   type's own I/O functions to convert to or from <type>text</type> or other
   string types, are not explicitly represented in
   <structname>pg_cast</structname>.
  </para>

  <table>
   <title><structname>pg_cast</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>oid</structfield> <type>oid</type>
      </para>
      <para>
       Row identifier
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>castsource</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the source data type
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>casttarget</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the target data type
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>castfunc</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The OID of the function to use to perform this cast.  Zero is
       stored if the cast method doesn't require a function.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>castcontext</structfield> <type>char</type>
      </para>
      <para>
       Indicates what contexts the cast can be invoked

Title: pg_cast Catalog: Data Type Conversion Paths
Summary
This section details the pg_cast catalog in PostgreSQL, which stores data type conversion paths. It outlines when a cast is or is not represented in pg_cast, noting exceptions like casts between a domain and its base type, and automatic I/O conversion casts. The section then provides a table describing the columns of the pg_cast catalog, including the OIDs of the source and target data types, the OID of the function used for the cast (if any), and the cast context.