Summary
The catalog pg_amop stores information about operators associated with access method operator families. There is one row for each operator that is a member of an operator family. A family member can be either a search operator or an ordering operator. An operator can appear in more than one family, but cannot appear in more than one search position nor more than one ordering position within a family. (It is allowed, though unlikely, for an operator to be used for both search and ordering purposes.)
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_amop system catalog exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
oidoid
Row identifieramopfamilyoidreferencespg_opfamily.oid
The operator family this entry is foramoplefttypeoidreferencespg_type.oid
Left-hand input data type of operatoramoprighttypeoidreferencespg_type.oid
Right-hand input data type of operatoramopstrategyint2
Operator strategy numberamoppurposechar
Operator purpose, either s for search or o for orderingamopoproidreferencespg_operator.oid
OID of the operatoramopmethodoidreferencespg_am.oid
Index access method operator family is foramopsortfamilyoidreferencespg_opfamily.oid
The B-tree operator family this entry sorts according to, if an ordering operator; zero if a search operator
Related catalogs
This object references the following other system catalogs:
amopfamily→pg_opfamilyamoplefttype→pg_typeamopopr→pg_operatoramopmethod→pg_am
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_amop.