Home Explore Blog CI



postgresql

79th chunk of `doc/src/sgml/catalogs.sgml`
b68473243e4b8f7dc107b81a5e382a754be649655dc127970000000100000fa8
 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><structname>pg_replication_origin</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>roident</structfield> <type>oid</type>
      </para>
      <para>
       A unique, cluster-wide identifier for the replication
       origin. Should never leave the system.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>roname</structfield> <type>text</type>
      </para>
      <para>
       The external, user defined, name of a replication
       origin.
      </para></entry>
     </row>
    </tbody>
   </tgroup>
  </table>
 </sect1>

 <sect1 id="catalog-pg-rewrite">
  <title><structname>pg_rewrite</structname></title>

  <indexterm zone="catalog-pg-rewrite">
   <primary>pg_rewrite</primary>
  </indexterm>

  <para>
   The catalog <structname>pg_rewrite</structname> stores rewrite rules for tables and views.
  </para>

  <table>
   <title><structname>pg_rewrite</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>rulename</structfield> <type>name</type>
      </para>
      <para>
       Rule name
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>ev_class</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The table this rule is for
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>ev_type</structfield> <type>char</type>
      </para>
      <para>
       Event type that the rule is for: 1 = <xref linkend="sql-select"/>, 2 =
       <xref linkend="sql-update"/>, 3 = <xref linkend="sql-insert"/>, 4 =
       <xref linkend="sql-delete"/>
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>ev_enabled</structfield> <type>char</type>
      </para>
      <para>
       Controls in which <xref linkend="guc-session-replication-role"/>

Title: pg_replication_origin and pg_rewrite Catalogs
Summary
This section describes the `pg_replication_origin` catalog, which stores replication origin information and is shared across all databases. It details the `roident` (unique identifier) and `roname` (user-defined name) columns. The section then introduces the `pg_rewrite` catalog, which contains rewrite rules for tables and views, and lists its columns: `oid` (row identifier), `rulename` (rule name), `ev_class` (table OID), `ev_type` (event type: SELECT, UPDATE, INSERT, DELETE), and `ev_enabled` (replication role control).