Updated on 2024-05-07 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

oid in PG_NAMESPACE

OID of the namespace that contains the operator.

oprowner

oid

oid in PG_AUTHID

Owner of the operator.

oprkind

"char"

-

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

oprcanmerge

boolean

-

Whether the operator supports merge joins

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

oprcanhash

boolean

-

Whether the operator supports hash joins

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

oprleft

oid

oid in PG_TYPE

Type of the left operand.

oprright

oid

oid in PG_TYPE

Type of the right operand.

oprresult

oid

oid in PG_TYPE

Type of the result.

oprcom

oid

oid in PG_OPERATOR

  • If it exists, the value is the exchange character of this operator.
  • If it does not exist, the value is 0.

oprnegate

oid

oid in PG_OPERATOR

  • If it exists, the value is the invertor of this operator.
  • If it does not exist, the value is 0.

oprcode

regproc

proname in PG_PROC

Function that implements the operator.

oprrest

regproc

proname in PG_PROC

Restriction selectivity estimation function for the operator.

oprjoin

regproc

proname in PG_PROC

Join selectivity estimation function for the operator.