Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc3a4d8e

Browse files
committed
Very minor improvements in CREATE OPERATOR docs.
1 parentc9f8ab6 commitc3a4d8e

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

‎doc/src/sgml/ref/create_operator.sgml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,11 @@ Operator that sorts the right-hand data type of this operator.
227227
(either one or two).
228228
</para>
229229
<para>
230-
Thecommutatoroperator is present so that
231-
<productname>Postgres</productname> can
230+
The commutator operatorshould be identified if one exists,
231+
so that<productname>Postgres</productname> can
232232
reverse the order of the operands if it wishes.
233233
For example, the operator area-less-than, &lt;&lt;&lt;,
234-
would have a commutator
234+
wouldprobablyhave a commutator
235235
operator, area-greater-than, &gt;&gt;&gt;.
236236
Hence, the query optimizer could freely convert:
237237
<programlisting>
@@ -243,14 +243,15 @@ Operator that sorts the right-hand data type of this operator.
243243
</para>
244244
<para>
245245
This allows the execution code to always use the latter
246-
representation and simplifies the query optimizer some
247-
what.
246+
representation and simplifies the query optimizer somewhat.
248247
</para>
249248
<para>
249+
Similarly, if there is a negator operator then it should be
250+
identified.
250251
Suppose that an
251252
operator, area-equal, ===, exists, as well as an area not
252253
equal, !==.
253-
The negatoroperator allows the query optimizer toconvert
254+
The negatorlink allows the query optimizer tosimplify
254255
<programlisting>
255256
NOT MYBOXES.description === "0,0,1,1"::box
256257
</programlisting>
@@ -325,8 +326,8 @@ Operator that sorts the right-hand data type of this operator.
325326
satisfy the clause. The function
326327
<replaceable class="parameter">res_proc</replaceable>
327328
must be a registered function (meaning it is already defined using
328-
define function(l)) which acceptsone argument of the correct
329-
datatype and returns a floating point number. The
329+
CREATE FUNCTION) which acceptsarguments of the correct
330+
datatypes and returns a floating point number. The
330331
query optimizer simply calls this function, passing the
331332
parameter "0,0,1,1" and multiplies the result by the relation
332333
size to get the desired expected number of instances.

‎src/man/create_operator.l

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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
66
create 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,
9495
area-greater-than, <<<. Hence, the query optimizer
9596
could freely convert:
9697
.nf
@@ -109,9 +110,10 @@ MYBOXES.description <<< "0,0,1,1"::box
109110
This allows the execution code to always use the latter representation
110111
and simplifies the query optimizer somewhat.
111112
.PP
113+
Similarly, if there is a negator operator then it should be identified.
112114
Suppose that an operator, area-equal, ===,
113115
exists, 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
.ce1
@@ -182,7 +184,7 @@ fraction of the instances in MYBOXES that satisfy the clause. The
182184
function res_proc must be a registered function (meaning it is already
183185
defined using
184186
.IR create_function(l))
185-
which acceptsone argumentof the correct datatype and returns a
187+
which acceptsargumentsof the correct datatypes and returns a
186188
floating point number. The query optimizer simply calls this
187189
function, passing the parameter "0,0,1,1"
188190
and multiplies the result by the relation size to get the desired

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp