pg_opclass

The pg_opclass system catalog table defines index access method operator classes. Each operator class defines semantics for index columns of a particular data type and a particular index access method. Note that there can be multiple operator classes for a given data type/access method combination, thus supporting multiple behaviors. The majority of the information defining an operator class is actually not in its pg_opclass row, but in the associated rows in pg_amop and pg_amproc. Those rows are considered to be part of the operator class definition — this is not unlike the way that a relation is defined by a single pg_class row plus associated rows in pg_attribute and other tables.

Table 1. pg_catalog.pg_opclass

columntypereferencesdescription
opcamidoidpg_am.oidIndex access method operator class is for.
opcnamename Name of this operator class
opcnamespaceoidpg_namespace.oidNamespace of this operator class
opcowneroidpg_authid.oidOwner of the operator class
opcintypeoidpg_type.oidData type that the operator class indexes.
opcdefaultboolean True if this operator class is the default for the data type opcintype.
opckeytypeoidpg_type.oidType of data stored in index, or zero if same as opcintype.