Updated on 2025-05-29 GMT+08:00

PG_OPERATOR

PG_OPERATOR records information about operators.

Table 1 PG_OPERATOR columns

Name

Type

Reference

Description

oid

oid

-

Row identifier (hidden attribute, which must be specified).

oprname

name

-

Name of an operator.

oprnamespace

oid

PG_NAMESPACE.oid

OID of the namespace that contains the operator.

oprowner

oid

PG_AUTHID.oid

Owner of the operator.

oprkind

"char"

-

  • b: infix (both sides)
  • l: prefix (left side)
  • r: suffix (right side)

oprcanmerge

Boolean

-

Specifies whether the operator supports merge joins.

  • t (true): yes
  • f (false): no

oprcanhash

Boolean

-

Specifies whether the operator supports hash joins.

  • t (true): yes
  • f (false): no

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

Type of the result.

oprcom

oid

PG_OPERATOR.oid

Exchange character of this operator if any; otherwise, 0.

oprnegate

oid

PG_OPERATOR.oid

Negator of this operator if any; otherwise, 0.

oprcode

regproc

PG_PROC.proname

Function that implements the operator

oprrest

regproc

PG_PROC.proname

Restriction selectivity estimation function for the operator.

oprjoin

regproc

PG_PROC.proname

Join selectivity estimation function for the operator.