Re: BUG #14016: Incomplete documentation of IN subquery expression - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: BUG #14016: Incomplete documentation of IN subquery expression
Date
Msg-id 20160426202737.GA13058@momjian.us
Whole thread Raw
In response to Re: BUG #14016: Incomplete documentation of IN subquery expression  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: BUG #14016: Incomplete documentation of IN subquery expression
List pgsql-bugs
On Fri, Mar 11, 2016 at 10:02:01AM -0700, David G. Johnston wrote:
> On Fri, Mar 11, 2016 at 9:39 AM, <manlio.perillo@gmail.com> wrote:
>
>     At the end of the documentation for VALUE (sql-values.html), there is the
>     following tip:
>     "For simple IN tests, it's better to rely on the list-of-scalars form of IN
>     than to write a VALUES query as shown above"
>
>     However there is no reference to the "list-of-scalars" forms of IN, in the
>     functions-subquery.html page.  It is only reported that the supported
>     syntax
>     is "expression IN (subquery)"
>
>     The reference was available in an old version (7.3), where the manual
>     documented both the scalar form and sub query form:
>     "expression IN (value[, ...])"
>
>
> ​It was moved...
>
> ​http://www.postgresql.org/docs/9.5/interactive/functions-comparisons.html#
> AEN20283
>
> ​The interpretation being that a "list of scalars" is, in this situation,
> semantically equivalent to an array - though having the later you would have to
> use "=ANY(array)" instead of "IN"
>
> ​Apparently someone disagreed with the note in the subquery section:
>
> >>>Note: This form of IN is not truly a subquery expression, but it seems best
> to document it in the same place as subquery IN.

Does the attached patch improve this?

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +

Attachment

pgsql-bugs by date:

Previous
From: Devrim Gündüz
Date:
Subject: Re: BUG #14014: postgresql95-setup script determines PGDATA wrongly
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #14016: Incomplete documentation of IN subquery expression