Summary
The catalog pg_opfamily defines operator families. Each operator family is a collection of operators and associated support routines that implement the semantics specified for a particular index access method. Furthermore, the operators in a family are all “compatible”, in a way that is specified by the access method. The operator family concept allows cross-data-type operators to be used with indexes and to be reasoned about using knowledge of access method semantics.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_opfamily system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
oidoid
Row identifieropfmethodoidreferencespg_am.oid
Index access method operator family is foropfnamename
Name of this operator familyopfnamespaceoidreferencespg_namespace.oid
Namespace of this operator familyopfowneroidreferencespg_authid.oid
Owner of the operator family
Related catalogs
This object references the following other system catalogs:
opfmethod→pg_amopfnamespace→pg_namespaceopfowner→pg_authid
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_opfamily.