The right-hand side is a parenthesized list
- of scalar expressions. The result is true
if the left-hand expression's
+ of expressions. The result is true
if the left-hand expression's
result is equal to any of the right-hand expressions. This is a shorthand
notation for
The right-hand side is a parenthesized list
- of scalar expressions. The result is true
if the left-hand expression's
+ of expressions. The result is true
if the left-hand expression's
result is unequal to all of the right-hand expressions. This is a shorthand
notation for
Each side is a row constructor,
as described in .
- 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 operator is
+ The two row constructors must have the same number of fields.
+ The given operator 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 = member of a B-tree
+ operator class, meaning that row constructor comparison is only
+ possible when the operator is
=,
<>,
<,
<=,
- > or
- >=.
- Every row element must be of a type which has a default B-tree operator
- class or the attempted comparison may generate an error.
+ >, or
+ >=,
+ or has semantics similar to one of these.
-
- Errors related to the number or types of elements might not occur if
- the comparison is resolved using earlier columns.
-
-
-
The = and <> cases work slightly differently
from the others. Two rows are considered
considered.
-
- Prior to
PostgreSQL 8.2, the
- <, <=, > and >=
- cases were not handled per SQL specification. A comparison like
- ROW(a,b) < ROW(c,d)
- was implemented as
- a < c AND b < d
- whereas the correct behavior is equivalent to
- a < c OR (a = c AND b < d).
-
-
-
row_constructor IS DISTINCT FROM row_constructor