Summary
The catalog pg_operator stores information about operators. See createoperator and xoper for more information.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_operator system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
oidoid
Row identifieroprnamename
Name of the operatoroprnamespaceoidreferencespg_namespace.oid
The OID of the namespace that contains this operatoroprowneroidreferencespg_authid.oid
Owner of the operatoroprkindchar
b = infix operator (“both”), or l = prefix operator (“left”)oprcanmergebool
This operator supports merge joinsoprcanhashbool
This operator supports hash joinsoprleftoidreferencespg_type.oid
Type of the left operand (zero for a prefix operator)oprrightoidreferencespg_type.oid
Type of the right operandoprresultoidreferencespg_type.oid
Type of the result (zero for a not-yet-defined “shell” operator)oprcomoidreferencespg_operator.oid
Commutator of this operator (zero if none)oprnegateoidreferencespg_operator.oid
Negator of this operator (zero if none)oprcoderegprocreferencespg_proc.oid
Function that implements this operator (zero for a not-yet-defined “shell” operator)oprrestregprocreferencespg_proc.oid
Restriction selectivity estimation function for this operator (zero if none)oprjoinregprocreferencespg_proc.oid
Join selectivity estimation function for this operator (zero if none)
Related catalogs
This object references the following other system catalogs:
oprnamespace→pg_namespaceoprowner→pg_authidoprleft→pg_typeoprcode→pg_proc
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_operator.