IN for records

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: nashev(at)mail(dot)ru
Subject: IN for records
Date: 2023-07-18 11:43:44
Message-ID: 168968062460.632.14303906825812821399@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2023-07-18 13:21:35 CREATEROLE Inheritance
Previous Message David G. Johnston 2023-07-18 03:13:41 Re: Bug in documentation: https://www.postgresql.org/docs/current/spi-examples.html