提交 3fb6e266 编写于 作者: L Lisa Owen 提交者: David Yozie

docs - remove operator RECHECK; add note, update sys catalog (#6414)

* docs - remove operator RECHECK; add note, update sys catalog

* add blank line
上级 26d33561
......@@ -2,9 +2,10 @@
<!DOCTYPE topic
PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="as20941">ALTER OPERATOR FAMILY</title><body><p id="sql_command_desc">Changes the definition of an operator family.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">ALTER OPERATOR FAMILY <varname>name</varname> USING <varname>index_method</varname> ADD
{ OPERATOR <varname>strategy_number</varname> <varname>operator_name</varname> ( <varname>op_type</varname>, <varname>op_type</varname> ) [ RECHECK ]
{ OPERATOR <varname>strategy_number</varname> <varname>operator_name</varname> ( <varname>op_type</varname>, <varname>op_type</varname> )
| FUNCTION <varname>support_number</varname> [ ( <varname>op_type</varname> [ , <varname>op_type</varname> ] ) ] <varname>funcname</varname> ( <varname>argument_type</varname> [, ...] )
} [, ... ]
ALTER OPERATOR FAMILY <varname>name</varname> USING <varname>index_method</varname> DROP
{ OPERATOR s<varname>trategy_number</varname> ( <varname>op_type</varname>, <varname>op_type</varname> )
| FUNCTION <varname>support_number</varname> [ ( <varname>op_type</varname> [ , <varname>op_type</varname> ] )
......@@ -59,12 +60,6 @@ ALTER OPERATOR FAMILY <varname>name</varname> USING <varname>index_method</varna
clause, the operand data type(s) the function is intended to support must be
specified.</pd>
</plentry>
<plentry>
<pt>RECHECK</pt>
<pd>If present, the index is "lossy" for this operator, and so the rows retrieved using
the index must be rechecked to verify that they actually satisfy the qualification
clause involving this operator.</pd>
</plentry>
<plentry>
<pt>support_number</pt>
<pd>The index method's support procedure number for a function associated with the
......@@ -94,6 +89,11 @@ ALTER OPERATOR FAMILY <varname>name</varname> USING <varname>index_method</varna
<p>The operators should not be defined by SQL functions. A SQL function is likely to be
inlined into the calling query, which will prevent the optimizer from recognizing that the
query matches an index.</p>
<p>Before Greenplum Database 6.0, the <codeph>OPERATOR</codeph> clause could include a
<codeph>RECHECK</codeph> option. This option is no longer supported. Greenplum
Database now determines whether an index operator is "lossy" on-the-fly at runtime. This
allows more efficient handling of cases where an operator might or might not be
lossy.</p>
</section>
<section id="section7">
<title>Examples</title>
......
......@@ -225,9 +225,9 @@ is likely to be inlined into the calling query, which will prevent the
optimizer from recognizing that the query matches an index.</p><p>Any functions used to implement the operator class must be defined
as <codeph>IMMUTABLE</codeph>.</p>
<p>Before Greenplum Database 6.0, the <codeph>OPERATOR</codeph> clause could include a
<codeph>RECHECK</codeph> option. This is no longer supported because Greenplum
Database determines whether an index operator is "lossy" on-the-fly at runtime. This
allows efficient handling of cases where an operator might or might not be
<codeph>RECHECK</codeph> option. This option is no longer supported. Greenplum
Database now determines whether an index operator is "lossy" on-the-fly at runtime. This
allows more efficient handling of cases where an operator might or might not be
lossy.</p></section><section id="section6"><title>Examples</title><p>The following example command defines a GiST index operator class for the data type
<codeph>_int4</codeph> (array of int4): </p><codeblock>CREATE OPERATOR CLASS gist__int_ops
DEFAULT FOR TYPE _int4 USING gist AS
......@@ -247,4 +247,4 @@ There is no <codeph>CREATE OPERATOR CLASS</codeph> statement in the SQL
standard.</p></section><section id="section8"><title>See Also</title><p><codeph><xref href="ALTER_OPERATOR_CLASS.xml#topic1" type="topic" format="dita"/></codeph>,
<codeph><xref href="./DROP_OPERATOR_CLASS.xml#topic1" type="topic"
format="dita"/></codeph>, <codeph><xref href="CREATE_FUNCTION.xml#topic1"
type="topic" format="dita"/></codeph></p></section></body></topic>
\ No newline at end of file
type="topic" format="dita"/></codeph></p></section></body></topic>
......@@ -7,6 +7,12 @@
<p>The <codeph>pg_amop</codeph> table stores information about operators associated with index
access method operator classes. There is one row for each operator that is a member of an
operator class.</p>
<p>An entry's <codeph>amopmethod</codeph> must match the <codeph>opfmethod</codeph>
of its containing operator family (including <codeph>amopmethod</codeph> here is
an intentional denormalization of the catalog structure for performance reasons).
Also, <codeph>amoplefttype</codeph> and <codeph>amoprighttype</codeph> must match
the <codeph>oprleft</codeph> and <codeph>oprright</codeph> fields of the referenced
<codeph>pg_operator</codeph> entry.</p>
<table id="fw143542">
<title>pg_catalog.pg_amop</title>
<tgroup cols="4">
......@@ -24,17 +30,22 @@
</thead>
<tbody>
<row>
<entry colname="col1"><codeph>amopclaid</codeph></entry>
<entry colname="col1"><codeph>amopfamily</codeph></entry>
<entry colname="col2">oid</entry>
<entry colname="col3">pg_opclass.oid</entry>
<entry colname="col4">The index operator class this entry is for</entry>
<entry colname="col3">pg_opfamily.oid</entry>
<entry colname="col4">The operator family that this entry is for</entry>
</row>
<row>
<entry colname="col1"><codeph>amopsubtype</codeph></entry>
<entry colname="col2">oid</entry>
<entry colname="col3">pg_type.oid</entry>
<entry colname="col4">Subtype to distinguish multiple entries for one strategy; zero for
default</entry>
<row>
<entry colname="col1"><codeph>amoplefttype</codeph></entry>
<entry colname="col2">oid</entry>
<entry colname="col3">pg_type.oid</entry>
<entry colname="col4">Left-hand input data type of operator</entry>
</row>
<row>
<entry colname="col1"><codeph>amoprighttype</codeph></entry>
<entry colname="col2">oid</entry>
<entry colname="col3">pg_type.oid</entry>
<entry colname="col4">Right-hand input data type of operator</entry>
</row>
<row>
<entry colname="col1"><codeph>amopstrategy</codeph></entry>
......@@ -42,18 +53,18 @@
<entry colname="col3"/>
<entry colname="col4">Operator strategy number</entry>
</row>
<row>
<entry colname="col1"><codeph>amopreqcheck</codeph></entry>
<entry colname="col2">boolean</entry>
<entry colname="col3"/>
<entry colname="col4">Index hit must be rechecked</entry>
</row>
<row>
<entry colname="col1"><codeph>amopopr</codeph></entry>
<entry colname="col2">oid</entry>
<entry colname="col3">pg_operator.oid</entry>
<entry colname="col4">OID of the operator</entry>
</row>
<row>
<entry colname="col1"><codeph>amopmethod</codeph></entry>
<entry colname="col2">oid</entry>
<entry colname="col3">pg_am.oid</entry>
<entry colname="col4">Index access method for the operator family</entry>
</row>
</tbody>
</tgroup>
</table>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册