Home Explore Blog CI



postgresql

78th chunk of `doc/src/sgml/catalogs.sgml`
05d86afaebc261f36a3cbdcf91211f4cca47c778b46699450000000100000fa6
 <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>rngtypid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the range type
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>rngsubtype</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the element type (subtype) of this range type
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>rngmultitypid</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the multirange type for this range type
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>rngcollation</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-collation"><structname>pg_collation</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the collation used for range comparisons, or zero if none
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>rngsubopc</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-opclass"><structname>pg_opclass</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the subtype's operator class used for range comparisons
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>rngcanonical</structfield> <type>regproc</type>
       (references <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the function to convert a range value into canonical form,
       or zero if none
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>rngsubdiff</structfield> <type>regproc</type>
       (references <link linkend="catalog-pg-proc"><structname>pg_proc</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       OID of the function to return the difference between two element
       values as <type>double precision</type>, or zero if none
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>

  <para>
   <structfield>rngsubopc</structfield> (plus <structfield>rngcollation</structfield>, if the
   element type is collatable) determines the sort ordering used by the range
   type.  <structfield>rngcanonical</structfield> is used when the element type is
   discrete.  <structfield>rngsubdiff</structfield> is optional but should be supplied to
   improve performance of GiST indexes on the range type.
  </para>

 </sect1>

 <sect1 id="catalog-pg-replication-origin">
  <title><structname>pg_replication_origin</structname></title>

  <indexterm zone="catalog-pg-replication-origin">
   <primary>pg_replication_origin</primary>
  </indexterm>

  <para>
   The <structname>pg_replication_origin</structname> catalog contains
   all replication origins created.  For more on replication origins
   see <xref linkend="replication-origins"/>.
  </para>

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

  <table>

Title: pg_range Columns and pg_replication_origin Catalog
Summary
This section details the columns of the `pg_range` catalog, including `rngtypid` (OID of the range type), `rngsubtype` (OID of the element type), `rngmultitypid` (OID of the multirange type), `rngcollation` (OID of the collation), `rngsubopc` (OID of the subtype's operator class), `rngcanonical` (OID of the function to convert to canonical form), and `rngsubdiff` (OID of the function to calculate the difference between element values). It explains the usage of `rngsubopc`, `rngcollation`, `rngcanonical`, and `rngsubdiff`. It then introduces the `pg_replication_origin` catalog, which stores information about replication origins and is shared across all databases in a cluster.