This page in other versions: 9.0 / 9.1 / 9.2 / 9.3 / 9.4  |  Development versions: devel  |  Unsupported versions: 7.3 / 7.4 / 8.0 / 8.1 / 8.2 / 8.3 / 8.4

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

Name Type References Description
opcamid oid pg_am.oid index access method opclass is for
opcname name   name of this opclass
opcnamespace oid pg_namespace.oid namespace of this opclass
opcowner int4 pg_shadow.usesysid opclass owner
opcintype oid pg_type.oid type of input data for opclass
opcdefault bool   true if opclass is default for opcintype
opckeytype oid pg_type.oid type 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.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group