Home Explore Blog CI



postgresql

29th chunk of `doc/src/sgml/information_schema.sgml`
c0879ef5d503da528a0c926683f49cc0bc2575db1b46159d0000000100000fa5
 <structfield>domain_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that contains the domain (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>domain_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema that contains the domain
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>domain_name</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the domain
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="infoschema-domains">
  <title><literal>domains</literal></title>

  <para>
   The view <literal>domains</literal> contains all
   <glossterm linkend="glossary-domain">domains</glossterm> defined in the
   current database.  Only those domains are shown that the current user has
   access to (by way of being the owner or having some privilege).
  </para>

  <table>
   <title><structname>domains</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>domain_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the database that contains the domain (always the current database)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>domain_schema</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Name of the schema that contains the domain
      </para></entry>
     </row>

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

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>data_type</structfield> <type>character_data</type>
      </para>
      <para>
       Data type of the domain, if it is a built-in type, or
       <literal>ARRAY</literal> if it is some array (in that case, see
       the view <literal>element_types</literal>), else
       <literal>USER-DEFINED</literal> (in that case, the type is
       identified in <literal>udt_name</literal> and associated
       columns).
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>character_maximum_length</structfield> <type>cardinal_number</type>
      </para>
      <para>
       If the domain has a character or bit string type, the declared
       maximum length; null for all other data types or if no maximum
       length was declared.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>character_octet_length</structfield> <type>cardinal_number</type>
      </para>
      <para>
       If the domain has a character type, the maximum possible length
       in octets (bytes) of a datum; null for all other data types.
       The maximum octet length depends on the declared character
       maximum length (see above) and the server encoding.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>character_set_catalog</structfield> <type>sql_identifier</type>
      </para>
      <para>
       Applies to a feature not available in <productname>PostgreSQL</productname>

Title: Domains Information Schema View
Summary
The view 'domains' contains information about all domains defined in the current database, including the database name, schema name, domain name, data type, and other characteristics such as character length and octet length, but only shows domains that the current user has access to.