pg_class_internal
pg_class_internal#
The system catalog table pg_class_internal
catalogs tables and most everything else that has columns or is otherwise similar to a table (also known as relations). This includes indexes (see also pg_index), sequences, views, composite types, and TOAST tables. Not all columns are meaningful for all relation types.
Table 1. pg_catalog.pg_class_internal
column |
type |
references |
description |
---|---|---|---|
|
oid |
The root OID of the object. For partition table, this column store OID of root table of the child table |
|
|
name |
Name of the table, index, view, etc. |
|
|
oid |
pg_namespace.oid |
The OID of the namespace (schema) that contains this relation |
|
oid |
pg_type.oid |
The OID of the data type that corresponds to this table’s row type, if any (zero for indexes, which have no |
|
oid |
pg_authid.oid |
Owner of the relation |
|
oid |
pg_am.oid |
If this is an index, the access method used (B-tree, Bitmap, hash, etc.) |
|
oid |
Name of the on-disk file of this relation; |
|
|
oid |
pg_tablespace.oid |
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.) |
|
smallint |
index of filespace location array |
|
|
integer |
Size of the on-disk representation of this table in pages (of 32K each). This is only an estimate used by the planner. It is updated by |
|
|
real |
Number of rows in the table. This is only an estimate used by the planner. It is updated by |
|
|
oid |
pg_class_internal.oid |
OID of the TOAST table associated with this table, |
|
oid |
pg_class_internal.oid |
For a TOAST table, the OID of its index. |
|
boolean |
True if this is a table and it has (or recently had) any indexes. This is set by |
|
|
boolean |
True if this table is shared across all databases in the system. Only certain system catalog tables are shared. |
|
|
char |
The type of object |
|
|
char |
The storage mode of a table |
|
|
smallint |
Number of user columns in the relation (system columns not counted). There must be this many corresponding entries in pg_attribute. |
|
|
smallint |
Number of check constraints on the table. |
|
|
smallint |
Number of triggers on the table. |
|
|
smallint |
Unused |
|
|
smallint |
Unused |
|
|
smallint |
Unused |
|
|
boolean |
True if an OID is generated for each row of the relation. |
|
|
boolean |
True if the table once had a primary key. |
|
|
boolean |
True if table has rules. |
|
|
boolean |
True if table has (or once had) any inheritance children. |
|
|
xid |
All transaction IDs before this one have been replaced with a permanent (frozen) 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 pg_clog to be shrunk. Zero ( |
|
|
aclitem[] |
Access privileges assigned by |
|
|
text[] |
Access-method-specific options, as “keyword=value” strings. |