Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 9b6cc37ce608401d44f6535a0c7cb777 > files > 74

postgresql11-docs-11.5-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>52.4. pg_amop</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="catalog-pg-am.html" title="52.3. pg_am" /><link rel="next" href="catalog-pg-amproc.html" title="52.5. pg_amproc" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">52.4. <code xmlns="http://www.w3.org/1999/xhtml" class="structname">pg_amop</code></th></tr><tr><td width="10%" align="left"><a accesskey="p" href="catalog-pg-am.html" title="52.3. pg_am">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="catalogs.html" title="Chapter 52. System Catalogs">Up</a></td><th width="60%" align="center">Chapter 52. System Catalogs</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 11.5 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="catalog-pg-amproc.html" title="52.5. pg_amproc">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="CATALOG-PG-AMOP"><div class="titlepage"><div><div><h2 class="title" style="clear: both">52.4. <code class="structname">pg_amop</code></h2></div></div></div><a id="id-1.10.4.6.2" class="indexterm"></a><p>
   The catalog <code class="structname">pg_amop</code> 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 <em class="firstterm">search</em> operator or an
   <em class="firstterm">ordering</em> 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.)
  </p><div class="table" id="id-1.10.4.6.4"><p class="title"><strong>Table 52.4. <code class="structname">pg_amop</code> Columns</strong></p><div class="table-contents"><table class="table" summary="pg_amop Columns" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Name</th><th>Type</th><th>References</th><th>Description</th></tr></thead><tbody><tr><td><code class="structfield">oid</code></td><td><code class="type">oid</code></td><td> </td><td>Row identifier (hidden attribute; must be explicitly selected)</td></tr><tr><td><code class="structfield">amopfamily</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-opfamily.html" title="52.35. pg_opfamily"><code class="structname">pg_opfamily</code></a>.oid</code></td><td>The operator family this entry is for</td></tr><tr><td><code class="structfield">amoplefttype</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-type.html" title="52.62. pg_type"><code class="structname">pg_type</code></a>.oid</code></td><td>Left-hand input data type of operator</td></tr><tr><td><code class="structfield">amoprighttype</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-type.html" title="52.62. pg_type"><code class="structname">pg_type</code></a>.oid</code></td><td>Right-hand input data type of operator</td></tr><tr><td><code class="structfield">amopstrategy</code></td><td><code class="type">int2</code></td><td> </td><td>Operator strategy number</td></tr><tr><td><code class="structfield">amoppurpose</code></td><td><code class="type">char</code></td><td> </td><td>Operator purpose, either <code class="literal">s</code> for search or
       <code class="literal">o</code> for ordering</td></tr><tr><td><code class="structfield">amopopr</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-operator.html" title="52.34. pg_operator"><code class="structname">pg_operator</code></a>.oid</code></td><td>OID of the operator</td></tr><tr><td><code class="structfield">amopmethod</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-am.html" title="52.3. pg_am"><code class="structname">pg_am</code></a>.oid</code></td><td>Index access method operator family is for</td></tr><tr><td><code class="structfield">amopsortfamily</code></td><td><code class="type">oid</code></td><td><code class="literal"><a class="link" href="catalog-pg-opfamily.html" title="52.35. pg_opfamily"><code class="structname">pg_opfamily</code></a>.oid</code></td><td>The B-tree operator family this entry sorts according to, if an
       ordering operator; zero if a search operator</td></tr></tbody></table></div></div><br class="table-break" /><p>
   A <span class="quote">“<span class="quote">search</span>”</span> operator entry indicates that an index of this operator
   family can be searched to find all rows satisfying
   <code class="literal">WHERE</code>
   <em class="replaceable"><code>indexed_column</code></em>
   <em class="replaceable"><code>operator</code></em>
   <em class="replaceable"><code>constant</code></em>.
   Obviously, such an operator must return <code class="type">boolean</code>, and its left-hand input
   type must match the index's column data type.
  </p><p>
   An <span class="quote">“<span class="quote">ordering</span>”</span> operator entry indicates that an index of this
   operator family can be scanned to return rows in the order represented by
   <code class="literal">ORDER BY</code>
   <em class="replaceable"><code>indexed_column</code></em>
   <em class="replaceable"><code>operator</code></em>
   <em class="replaceable"><code>constant</code></em>.
   Such an operator could return any sortable data type, though again
   its left-hand input type must match the index's column data type.
   The exact semantics of the <code class="literal">ORDER BY</code> are specified by the
   <code class="structfield">amopsortfamily</code> column, which must reference
   a B-tree operator family for the operator's result type.
  </p><div class="note"><h3 class="title">Note</h3><p>
    At present, it's assumed that the sort order for an ordering operator
    is the default for the referenced operator family, i.e., <code class="literal">ASC NULLS
    LAST</code>.  This might someday be relaxed by adding additional columns
    to specify sort options explicitly.
   </p></div><p>
   An entry's <code class="structfield">amopmethod</code> must match the
   <code class="structname">opfmethod</code> of its containing operator family (including
   <code class="structfield">amopmethod</code> here is an intentional denormalization of the
   catalog structure for performance reasons).  Also,
   <code class="structfield">amoplefttype</code> and <code class="structfield">amoprighttype</code> must match
   the <code class="structfield">oprleft</code> and <code class="structfield">oprright</code> fields of the
   referenced <code class="structname">pg_operator</code> entry.
  </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="catalog-pg-am.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="catalogs.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="catalog-pg-amproc.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">52.3. <code class="structname">pg_am</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 52.5. <code class="structname">pg_amproc</code></td></tr></table></div></body></html>