↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Supported versions: Current (18) / 17 / 16 / 15 / 14
Development versions: 19 / 20devel
Unsupported versions: 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4 / 9.3 / 9.2 / 9.1 / 9.0 / 8.4 / 8.3 / 8.2 / 8.1 / 8.0 / 7.4 / 7.3
Historical version. PostgreSQL 7.3 has reached end of support. See the current manual.

3.22. pg_opclass

pg_opclass defines index access method operator classes. Each operator class defines semantics for index columns of a particular datatype and a particular index access method. Note that there can be multiple operator classes for a given datatype/access method combination, thus supporting multiple behaviors.

Operator classes are described at length in the Programmer's Guide.

Table 3-22. pg_opclass Columns

NameTypeReferencesDescription
opcamidoidpg_am.oidindex access method opclass is for
opcnamename name of this opclass
opcnamespaceoidpg_namespace.oidnamespace of this opclass
opcownerint4pg_shadow.usesysidopclass owner
opcintypeoidpg_type.oidtype of input data for opclass
opcdefaultbool true if opclass is default for opcintype
opckeytypeoidpg_type.oidtype of index data, or zero if same as opcintype

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.

Report a documentation issue

Read the upstream documentation. For corrections, first check the current manual.