<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.16 2000/09/12 20:52:08 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.17 2000/10/10 04:42:43 momjian Exp $
Postgres documentation
-->
Hence, the query optimizer could freely convert:
<programlisting>
-box '((0,0),(1,1))' >>> MYBOXES.description
+box '((0,0), (1,1))' >>> MYBOXES.description
</programlisting>
to
<programlisting>
-MYBOXES.description <<< box '((0,0),(1,1))'
+MYBOXES.description <<< box '((0,0), (1,1))'
</programlisting>
</para>
<para>
equal, !==.
The negator link allows the query optimizer to simplify
<programlisting>
-NOT MYBOXES.description === box '((0,0),(1,1))'
+NOT MYBOXES.description === box '((0,0), (1,1))'
</programlisting>
to
<programlisting>
-MYBOXES.description !== box '((0,0),(1,1))'
+MYBOXES.description !== box '((0,0), (1,1))'
</programlisting>
</para>
<para>
The RESTRICT and JOIN options assist the query optimizer in estimating
result sizes. If a clause of the form:
<programlisting>
-MYBOXES.description <<< box '((0,0),(1,1))'
+MYBOXES.description <<< box '((0,0), (1,1))'
</programlisting>
is present in the qualification,
then <productname>Postgres</productname> may have to
<command>CREATE FUNCTION</command>) which accepts arguments of the correct
data types and returns a floating point number. The
query optimizer simply calls this function, passing the
- parameter <literal>((0,0),(1,1))</literal> and multiplies the result by the relation
+ parameter <literal>((0,0), (1,1))</literal> and multiplies the result by the relation
size to get the expected number of instances.
</para>
<para>
<para>
The difference between the function
<programlisting>
-my_procedure_1 (MYBOXES.description, box '((0,0),(1,1))')
+my_procedure_1 (MYBOXES.description, box '((0,0), (1,1))')
</programlisting>
and the operator
<programlisting>
-MYBOXES.description === box '((0,0),(1,1))'
+MYBOXES.description === box '((0,0), (1,1))'
</programlisting>
is that <productname>Postgres</productname>
attempts to optimize operators and can