Updated on 2025-08-25 GMT+08:00

PG_OPERATOR

PG_OPERATOR stores information about operators.

Table 1 PG_OPERATOR columns

Column

Type

Reference

Description

oid

oid

-

Row identifier (a hidden attribute that is only shown upon explicit selection).

oprname

name

-

Name of an operator.

oprnamespace

oid

PG_NAMESPACE.oid

OID of the namespace containing this operator.

oprowner

oid

PG_AUTHID.oid

Owner of the operator.

oprkind

"char"

-

  • b: infix (both)
  • l: prefix (left)
  • r: postfix (right)

oprcanmerge

Boolean

-

Whether the operator supports merge joins.

oprcanhash

Boolean

-

Whether the operator supports hash joins.

oprleft

oid

PG_TYPE.oid

Type of the left operand.

oprright

oid

PG_TYPE.oid

Type of the right operand.

oprresult

oid

PG_TYPE.oid

Result type.

oprcom

oid

PG_OPERATOR.oid

Commutator of this operator (if any).

oprnegate

oid

PG_OPERATOR.oid

Negator of this operator (if any).

oprcode

regproc

PG_PROC.oid

Function implementing this operator.

oprrest

regproc

PG_PROC.oid

Constraint selectivity estimation function for this operator.

oprjoin

regproc

PG_PROC.oid

Join selectivity estimation function for this operator.