Home Explore Blog CI



postgresql

27th chunk of `doc/src/sgml/catalogs.sgml`
31c0f7704d59812e0bb64090a343e174b91d640e0cf8fcea0000000100000fa3
 <structfield>relhastriggers</structfield> <type>bool</type>
      </para>
      <para>
       True if table has (or once had) triggers; see
       <link linkend="catalog-pg-trigger"><structname>pg_trigger</structname></link> catalog
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relhassubclass</structfield> <type>bool</type>
      </para>
      <para>
       True if table or index has (or once had) any inheritance children or partitions
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relrowsecurity</structfield> <type>bool</type>
      </para>
      <para>
       True if table has row-level security enabled; see
       <link linkend="catalog-pg-policy"><structname>pg_policy</structname></link> catalog
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relforcerowsecurity</structfield> <type>bool</type>
      </para>
      <para>
       True if row-level security (when enabled) will also apply to table owner; see
       <link linkend="catalog-pg-policy"><structname>pg_policy</structname></link> catalog
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relispopulated</structfield> <type>bool</type>
      </para>
      <para>
       True if relation is populated (this is true for all
       relations other than some materialized views)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relreplident</structfield> <type>char</type>
      </para>
      <para>
       Columns used to form <quote>replica identity</quote> for rows:
       <literal>d</literal> = default (primary key, if any),
       <literal>n</literal> = nothing,
       <literal>f</literal> = all columns,
       <literal>i</literal> = index with
       <structfield>indisreplident</structfield> set (same as nothing if the
       index used has been dropped)
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relispartition</structfield> <type>bool</type>
      </para>
      <para>
       True if table or index is a partition
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relrewrite</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-class"><structname>pg_class</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       For new relations being written during a DDL operation that requires a
       table rewrite, this contains the OID of the original relation;
       otherwise zero.  That state is only visible internally; this field should
       never contain anything other than zero for a user-visible relation.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relfrozenxid</structfield> <type>xid</type>
      </para>
      <para>
       All transaction IDs before this one have been replaced with a permanent
       (<quote>frozen</quote>) transaction ID in this table.  This is used to track
       whether the table needs to be vacuumed in order to prevent transaction
       ID wraparound or to allow <literal>pg_xact</literal> to be shrunk.  Zero
       (<symbol>InvalidTransactionId</symbol>) if the relation is not a table.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relminmxid</structfield> <type>xid</type>
      </para>
      <para>
       All multixact IDs before this one have been replaced by a
       transaction ID in this table.  This

Title: pg_class Columns (Continued)
Summary
This section continues to detail the columns of the pg_class catalog table, describing various attributes of database relations. It covers whether a table has triggers (relhastriggers), inheritance children or partitions (relhassubclass), row-level security enabled (relrowsecurity) and enforced for the owner (relforcerowsecurity), whether the relation is populated (relispopulated), the columns used for replica identity (relreplident), whether the relation is a partition (relispartition), the OID of the original relation during a table rewrite (relrewrite), the oldest transaction ID that hasn't been frozen (relfrozenxid), and the oldest multixact ID replaced by a transaction ID (relminmxid).