11.\" This is -*-nroff-*-
22.\" XXX standard disclaimer belongs here....
3- .\" $Header: /cvsroot/pgsql/src/man/Attic/create_operator.l,v 1.8 1999/04/15 00:09:00 tgl Exp $
3+ .\" $Header: /cvsroot/pgsql/src/man/Attic/create_operator.l,v 1.9 1999/05/20 03:21:02 tgl Exp $
44.TH "CREATE OPERATOR" SQL 11/05/95 PostgreSQL PostgreSQL
55.SH NAME
66create operator - define a new user operator
@@ -88,9 +88,10 @@ and must have one or two arguments.
8888.\" .(l
8989.\" MYBOXES2.description A (\*(lq0,0,1,1\*(rq A MYBOXES.description).
9090.\" .)l
91- The commutator operator is present so that Postgres can reverse the order
92- of the operands if it wishes. For example, the operator
93- area-less-than, >>>, would have a commutator operator,
91+ The commutator operator should be identified if one exists,
92+ so that Postgres can reverse the order of the operands if it wishes.
93+ For example, the operator
94+ area-less-than, >>>, would probably have a commutator operator,
9495area-greater-than, <<<. Hence, the query optimizer
9596could freely convert:
9697.nf
@@ -109,9 +110,10 @@ MYBOXES.description <<< "0,0,1,1"::box
109110This allows the execution code to always use the latter representation
110111and simplifies the query optimizer somewhat.
111112.PP
113+ Similarly, if there is a negator operator then it should be identified.
112114Suppose that an operator, area-equal, ===,
113115exists, as well as an area not equal, !==.
114- The negatoroperator allows the query optimizer toconvert
116+ The negatorlink allows the query optimizer tosimplify
115117.nf
116118
117119.ce 1
@@ -182,7 +184,7 @@ fraction of the instances in MYBOXES that satisfy the clause. The
182184function res_proc must be a registered function (meaning it is already
183185defined using
184186.IR create_function(l))
185- which acceptsone argument of the correct datatype and returns a
187+ which acceptsarguments of the correct datatypes and returns a
186188floating point number. The query optimizer simply calls this
187189function, passing the parameter "0,0,1,1"
188190and multiplies the result by the relation size to get the desired