aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/func.sgml30
1 files changed, 14 insertions, 16 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 827c4afc654..2ea31830cbb 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -16858,7 +16858,7 @@ WHERE EXISTS (SELECT 1 FROM tab2 WHERE col2 = tab1.col2);
<para>
The right-hand side is a parenthesized list
- of scalar expressions. The result is <quote>true</quote> if the left-hand expression's
+ of expressions. The result is <quote>true</quote> if the left-hand expression's
result is equal to any of the right-hand expressions. This is a shorthand
notation for
@@ -16889,7 +16889,7 @@ OR
<para>
The right-hand side is a parenthesized list
- of scalar expressions. The result is <quote>true</quote> if the left-hand expression's
+ of expressions. The result is <quote>true</quote> if the left-hand expression's
result is unequal to all of the right-hand expressions. This is a shorthand
notation for
@@ -17000,26 +17000,24 @@ AND
<para>
Each side is a row constructor,
as described in <xref linkend="sql-syntax-row-constructors"/>.
- The two row values must have the same number of fields.
- Each side is evaluated and they are compared row-wise. Row constructor
- comparisons are allowed when the <replaceable>operator</replaceable> is
+ The two row constructors must have the same number of fields.
+ The given <replaceable>operator</replaceable> is applied to each pair
+ of corresponding fields. (Since the fields could be of different
+ types, this means that a different specific operator could be selected
+ for each pair.)
+ All the selected operators must be members of some B-tree operator
+ class, or be the negator of an <literal>=</literal> member of a B-tree
+ operator class, meaning that row constructor comparison is only
+ possible when the <replaceable>operator</replaceable> is
<literal>=</literal>,
<literal>&lt;&gt;</literal>,
<literal>&lt;</literal>,
<literal>&lt;=</literal>,
- <literal>&gt;</literal> or
- <literal>&gt;=</literal>.
- Every row element must be of a type which has a default B-tree operator
- class or the attempted comparison may generate an error.
+ <literal>&gt;</literal>, or
+ <literal>&gt;=</literal>,
+ or has semantics similar to one of these.
</para>
- <note>
- <para>
- Errors related to the number or types of elements might not occur if
- the comparison is resolved using earlier columns.
- </para>
- </note>
-
<para>
The <literal>=</literal> and <literal>&lt;&gt;</literal> cases work slightly differently
from the others. Two rows are considered