Home Explore Blog CI



postgresql

36th chunk of `doc/src/sgml/catalogs.sgml`
d3ac25f4267d26e7e2f6db3f7be7c784ba7f0cd510376a1a0000000100000fa4
 linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Owner of the conversion
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>conforencoding</structfield> <type>int4</type>
      </para>
      <para>
       Source encoding ID (<link linkend="pg-encoding-to-char"><function>pg_encoding_to_char()</function></link>
       can translate this number to the encoding name)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>contoencoding</structfield> <type>int4</type>
      </para>
      <para>
       Destination encoding ID (<link linkend="pg-encoding-to-char"><function>pg_encoding_to_char()</function></link>
       can translate this number to the encoding name)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>conproc</structfield> <type>regproc</type>
       (references <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Conversion function
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>condefault</structfield> <type>bool</type>
      </para>
      <para>
       True if this is the default conversion
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

 </sect1>

 <sect1 id="catalog-pg-database">
  <title><structname>pg_database</structname></title>

  <indexterm zone="catalog-pg-database">
   <primary>pg_database</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_database</structname> stores information about
   the available databases.  Databases are created with the <link
   linkend="sql-createdatabase"><command>CREATE DATABASE</command></link> command.
   Consult <xref linkend="managing-databases"/> for details about the meaning
   of some of the parameters.
  </para>

  <para>
   Unlike most system catalogs, <structname>pg_database</structname>
   is shared across all databases of a cluster: there is only one
   copy of <structname>pg_database</structname> per cluster, not
   one per database.
  </para>

  <table>
   <title><structname>pg_database</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>datname</structfield> <type>name</type>
      </para>
      <para>
       Database name
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>datdba</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Owner of the database, usually the user who created it
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>encoding</structfield> <type>int4</type>
      </para>
      <para>
       Character encoding for this database
       (<link linkend="pg-encoding-to-char"><function>pg_encoding_to_char()</function></link> can translate
       this number to the encoding name)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para

Title: pg_conversion and pg_database Catalogs
Summary
This section details the remaining columns of the pg_conversion catalog, including conproc (conversion function) and condefault (whether it's the default conversion). It then introduces the pg_database catalog, which stores information about available databases, created using the CREATE DATABASE command. Unlike most system catalogs, pg_database is shared across all databases in a cluster. The section then presents the table schema for pg_database, including columns for OID, database name, owner, character encoding, and database options.