pg_amop — PostgreSQL system catalog

The PostgreSQL pg_amop system catalog: full column reference (names, types, descriptions), catalog relationships and version support.

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):

  • oid oid
    Row identifier
  • amopfamily oid references pg_opfamily.oid
    The operator family this entry is for
  • amoplefttype oid references pg_type.oid
    Left-hand input data type of operator
  • amoprighttype oid references pg_type.oid
    Right-hand input data type of operator
  • amopstrategy int2
    Operator strategy number
  • amoppurpose char
    Operator purpose, either s for search or o for ordering
  • amopopr oid references pg_operator.oid
    OID of the operator
  • amopmethod oid references pg_am.oid
    Index access method operator family is for
  • amopsortfamily oid references pg_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:

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.