Home Explore Blog CI



postgresql

24th chunk of `doc/src/sgml/catalogs.sgml`
4c3a55be2fbf2dc3534790f0d5ffa3b9a9b37241a5d046170000000100000fa2
 role="catalog_table_entry"><para role="column_definition">
       <structfield>reloftype</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-type"><structname>pg_type</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       For typed tables, the OID of the underlying composite type;
       zero for all other relations
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relowner</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       Owner of the relation
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relam</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-am"><structname>pg_am</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The access method used to access this table or index.
       Not meaningful if the relation is a sequence or
       has no on-disk file,
       except for partitioned tables, where, if set, it takes
       precedence over <varname>default_table_access_method</varname>
       when determining the access method to use for partitions created
       when one is not specified in the creation command.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relfilenode</structfield> <type>oid</type>
      </para>
      <para>
       Name of the on-disk file of this relation; zero means this
       is a <quote>mapped</quote> relation whose disk file name is determined
       by low-level state
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>reltablespace</structfield> <type>oid</type>
       (references <link linkend="catalog-pg-tablespace"><structname>pg_tablespace</structname></link>.<structfield>oid</structfield>)
      </para>
      <para>
       The tablespace in which this relation is stored.
       If zero, the database's default tablespace is implied.
       Not meaningful if the relation has no on-disk file,
       except for partitioned tables, where this is the tablespace
       in which partitions will be created when one is not
       specified in the creation command.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>relpages</structfield> <type>int4</type>
      </para>
      <para>
       Size of the on-disk representation of this table in pages (of size
       <symbol>BLCKSZ</symbol>).  This is only an estimate used by the
       planner.  It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>,
       <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as
       <link linkend="sql-createindex"><command>CREATE INDEX</command></link>.
      </para></entry>
     </row>

     <row>
      <entry role="catalog_table_entry"><para role="column_definition">
       <structfield>reltuples</structfield> <type>float4</type>
      </para>
      <para>
       Number of live rows in the table.  This is only an estimate used by
       the planner.  It is updated by <link linkend="sql-vacuum"><command>VACUUM</command></link>,
       <link linkend="sql-analyze"><command>ANALYZE</command></link>, and a few DDL commands such as
       <link linkend="sql-createindex"><command>CREATE INDEX</command></link>.
       If the table has never yet been vacuumed or
       analyzed, <structfield>reltuples</structfield>
       contains <literal>-1</literal> indicating that the row count is
       unknown.
      </para></entry>
     </row>

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

Title: pg_class Columns (Continued)
Summary
This section continues the description of the pg_class catalog table columns, detailing relowner (owner OID), relam (access method OID), relfilenode (on-disk file name), reltablespace (tablespace OID), relpages (size of on-disk representation in pages), and reltuples (number of live rows in the table). It explains the meaning of each column and notes when the values are not applicable (e.g., when a relation has no on-disk file).