-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcatalog-pg-amop.html
More file actions
65 lines (65 loc) · 11.6 KB
/
Copy pathcatalog-pg-amop.html
File metadata and controls
65 lines (65 loc) · 11.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?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>51.4. pg_amop</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="catalog-pg-am.html" title="51.3. pg_am" /><link rel="next" href="catalog-pg-amproc.html" title="51.5. pg_amproc" /><meta name="viewport" content="width=device-width,initial-scale=1.0" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="4" align="center"><a accesskey="h" href="index.html">PostgreSQL 10.5文書</a></th></tr><tr><td width="10%" align="left"></td><td width="10%" align="left"></td><td width="60%" align="center"><a href="catalogs.html" title="第51章 システムカタログ">第51章 システムカタログ</a></td><td width="20%" align="right"><div class="actions"><a class="issue" title="github" href="https://github.com/pgsql-jp/jpug-doc/issues/new?title=version 10.5 catalog-pg-amop.html">誤訳等の報告
</a></div></td></tr><tr><td width="10%" align="left"><a accesskey="p" href="catalog-pg-am.html" title="51.3. pg_am">前へ</a> </td><td width="10%" align="left"><a accesskey="u" href="catalogs.html" title="第51章 システムカタログ">上へ</a></td><td width="60%" align="center">51.4. <code class="structname">pg_amop</code></td><td width="20%" align="right"> <a accesskey="n" href="catalog-pg-amproc.html" title="51.5. pg_amproc">次へ</a></td></tr></table><hr /></div><div class="sect1" id="CATALOG-PG-AMOP"><div class="titlepage"><div><div><h2 class="title" style="clear: both">51.4. <code class="structname">pg_amop</code></h2></div></div></div><a id="id-1.10.4.6.2" class="indexterm"></a><p><span class="original">
The catalog <structname>pg_amop</structname> 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 <firstterm>search</> operator or an
<firstterm>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.)
</span><code class="structname">pg_amop</code>カタログにはアクセスメソッド演算子の集合に関連付けられた演算子の情報が格納されています。
演算子族のメンバである演算子毎に1つの行が存在します。
演算子族のメンバは<em class="firstterm">検索</em>演算子または<em class="firstterm">順序付け</em>演算子のいずれかになることができます。
演算子は1つ以上の演算子族に現れますが、演算子族の中では検索でも順序付けでも複数現れることはありません。
(ほとんどありませんが、ある演算子が検索目的と順序付け目的の両方で使用されることが許されます。)
</p><div class="table" id="id-1.10.4.6.4"><p class="title"><strong>表51.4 <code class="structname">pg_amop</code>の列</strong></p><div class="table-contents"><span class="original">
<title><structname>pg_amop</> Columns</title>
</span><table class="table" summary="pg_amopの列" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>名前</th><th>型</th><th>参照先</th><th>説明</th></tr></thead><tbody><tr><td><code class="structfield">oid</code></td><td><code class="type">oid</code></td><td> </td><td>行識別子(隠し属性です。明示的に選択しなければなりません)</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="51.35. pg_opfamily"><code class="structname">pg_opfamily</code></a>.oid</code></td><td>この項目用の演算子族</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="51.62. pg_type"><code class="structname">pg_type</code></a>.oid</code></td><td>演算子の左辺側のデータ型</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="51.62. pg_type"><code class="structname">pg_type</code></a>.oid</code></td><td>演算子の右辺側のデータ型</td></tr><tr><td><code class="structfield">amopstrategy</code></td><td><code class="type">int2</code></td><td> </td><td>演算子の戦略番号</td></tr><tr><td><code class="structfield">amoppurpose</code></td><td><code class="type">char</code></td><td> </td><td>演算子の目的。検索用ならば<code class="literal">s</code>、順序付け用であれば<code class="literal">o</code></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="51.34. pg_operator"><code class="structname">pg_operator</code></a>.oid</code></td><td>演算子のOID</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="51.3. pg_am"><code class="structname">pg_am</code></a>.oid</code></td><td>演算子族用のインデックスアクセスメソッド</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="51.35. pg_opfamily"><code class="structname">pg_opfamily</code></a>.oid</code></td><td>順序付け用の演算子の場合、この項目のソートが従うB-tree演算子族。検索用演算子であればゼロ
</td></tr></tbody></table></div></div><br class="table-break" /><p><span class="original">
A <quote>search</> operator entry indicates that an index of this operator
family can be searched to find all rows satisfying
<literal>WHERE</>
<replaceable>indexed_column</>
<replaceable>operator</>
<replaceable>constant</>.
Obviously, such an operator must return <type>boolean</type>, and its left-hand input
type must match the index's column data type.
</span><span class="quote">「<span class="quote">検索</span>」</span>用演算子の項目は、この演算子族のインデックスを<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>を満たすすべての行を見つけるための検索に使用できることを示します。
いうまでもありませんが、こうした演算子は<code class="type">論理型</code>を返さなければならず、また左辺の入力型はインデックス列のデータ型に一致しなければなりません。
</p><p><span class="original">
An <quote>ordering</> operator entry indicates that an index of this
operator family can be scanned to return rows in the order represented by
<literal>ORDER BY</>
<replaceable>indexed_column</>
<replaceable>operator</>
<replaceable>constant</>.
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 <literal>ORDER BY</> are specified by the
<structfield>amopsortfamily</structfield> column, which must reference
a B-tree operator family for the operator's result type.
</span><span class="quote">「<span class="quote">順序付け</span>」</span>用演算子の項目は、この演算子族のインデックスを<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>で表される順序で行を返すためのスキャンに使用できることを示します。
こうした演算子の左辺の入力型はインデックス列のデータ型に一致しなければならないことは同じですが、任意のソート可能なデータ型を返すことができます。
<code class="literal">ORDER BY</code>の正確な意味は、この演算子の結果型用のB-tree演算子族を参照する必要がある<code class="structfield">amopsortfamily</code>列により指定されます。
</p><div class="note"><h3 class="title">注記</h3><p><span class="original">
At present, it's assumed that the sort order for an ordering operator
is the default for the referenced operator family, i.e., <literal>ASC NULLS
LAST</>. This might someday be relaxed by adding additional columns
to specify sort options explicitly.
</span>現在、順序付け演算子のソート順は参照される演算子族のデフォルト、つまり<code class="literal">ASC NULLS LAST</code>であると仮定されています。
これは将来、ソートオプションを明示的に指定する追加列を加えることで緩和されるかもしれません。
</p></div><p><span class="original">
An entry's <structfield>amopmethod</> must match the
<structname>opfmethod</> of its containing operator family (including
<structfield>amopmethod</> here is an intentional denormalization of the
catalog structure for performance reasons). Also,
<structfield>amoplefttype</> and <structfield>amoprighttype</> must match
the <structfield>oprleft</> and <structfield>oprright</> fields of the
referenced <structname>pg_operator</> entry.
</span>項目の<code class="structfield">amopmethod</code>は、項目を含む演算子族の<code class="structname">opfmethod</code>に一致しなくてはいけません。
(ここでの<code class="structfield">amopmethod</code>は、性能上の理由からカタログ構造を意図的に非正規化したものも含みます。)
また、<code class="structfield">amoplefttype</code>と<code class="structfield">amoprighttype</code>は、参照されている<code class="structname">pg_operator</code>項目の<code class="structfield">oprleft</code>と<code class="structfield">oprright</code>に一致しなくてはいけません。
</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">前へ</a> </td><td width="20%" align="center"><a accesskey="u" href="catalogs.html">上へ</a></td><td width="40%" align="right"> <a accesskey="n" href="catalog-pg-amproc.html">次へ</a></td></tr><tr><td width="40%" align="left" valign="top">51.3. <code class="structname">pg_am</code> </td><td width="20%" align="center"><a accesskey="h" href="index.html">ホーム</a></td><td width="40%" align="right" valign="top"> 51.5. <code class="structname">pg_amproc</code></td></tr></table></div></body></html>