IN for records
The Post Office <noreply@postgresql.org>
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: nashev@mail.ru
Date: 2023-07-18T11:43:44Z
Lists: pgsql-docs
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/15/functions-comparisons.html
Description:
In section #FUNCTIONS-COMPARISONS-IN-SCALAR operator IN is described as a
expression for scalars, and as a shorthand notation for a combination of
operators || and =
In section #COMPOSITE-TYPE-COMPARISON described extension, to use operators
with a records, like "record operator record" for uncertain set of
operators, and noted "Composite type comparisons are allowed when the
operator is =, <>, <, <=, > or >=, or has semantics similar to one of
these." and with a some difficult to understand note about B-trees.
And as result, I can't see a direct description for allowance to use a
syntax like a "(key_part_1, key_part_2) IN ( ('B',1), ('C',2) )"
So I propose to mention record types in section
#FUNCTIONS-COMPARISONS-IN-SCALAR. Phrase "The right-hand side is a
parenthesized list of scalar expressions." can be replaced to phrases "The
right-hand side is a parenthesized list of scalar or record expressions.
About records [see further](#COMPOSITE-TYPE-COMPARISON)"
Also I propose make similar adjustments in other sections of this page, and
make cross-links here and in a
https://www.postgresql.org/docs/current/functions-subquery.html page near
the text mentions of each others.
Commits
-
Doc: improve description of IN and row-constructor comparisons.
- fd7c944690b2 11.21 landed
- bc9993a54977 15.4 landed
- 8286b432c32d 14.9 landed
- 27e945944bdb 13.12 landed
- 245d0e6d0d1c 16.0 landed
- 22d0c30bd966 12.16 landed
- 15c68cd84a2c 17.0 landed