September 26, 2024: PostgreSQL 17 Released!
Supported Versions: Current (17) / 16 / 15 / 14 / 13 / 12
Development Versions: devel
Unsupported versions: 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 / 7.2 / 7.1
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

3.23. pg_operator

See CREATE OPERATOR and the Programmer's Guide for details on these operator parameters.

Table 3-23. pg_operator Columns

Name Type References Description
oprname name   Name of the operator
oprnamespace oid pg_namespace.oid The OID of the namespace that contains this operator
oprowner int4 pg_shadow.usesysid Owner (creator) of the operator
oprkind char   'b' = infix ("both"), 'l' = prefix ("left"), 'r' = postfix ("right")
oprcanhash bool   This 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 Type of the result
oprcom oid pg_operator.oid Commutator of this operator, if any
oprnegate oid pg_operator.oid Negator of this operator, if any
oprlsortop oid pg_operator.oid If this operator supports merge joins, the operator that sorts the type of the left-hand operand (L<L)
oprrsortop oid pg_operator.oid If this operator supports merge joins, the operator that sorts the type of the right-hand operand (R<R)
oprltcmpop oid pg_operator.oid If this operator supports merge joins, the less-than operator that compares the left and right operand types (L<R)
oprgtcmpop oid pg_operator.oid If this operator supports merge joins, the greater-than operator that compares the left and right operand types (L>R)
oprcode regproc pg_proc.oid Function that implements this operator
oprrest regproc pg_proc.oid Restriction selectivity estimation function for this operator
oprjoin regproc pg_proc.oid Join selectivity estimation function for this operator

Unused fields contain zeroes, for example oprleft is zero for a prefix operator.