From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Manlio Perillo <manlio(dot)perillo(at)gmail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14016: Incomplete documentation of IN subquery expression |
Date: | 2016-04-26 21:00:39 |
Message-ID: | CAKFQuwaV9t0kRQPsnskF9yQ=L+P+TvDYMV+X0xnGxHz=5-XG6g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Apr 26, 2016 at 1:27 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Fri, Mar 11, 2016 at 10:02:01AM -0700, David G. Johnston wrote:
> > On Fri, Mar 11, 2016 at 9:39 AM, <manlio(dot)perillo(at)gmail(dot)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?
>
I'd append "scalar" to the id to distinguish in from the subquery
version. Otherwise any suggest I make seems like overkill. The main point
being the "list of scalars" is not a term we use on the referenced page,
and the chapter header indicates "Row and Array" of which this is similar
but technically neither.
<sect2 id="functions-comparisons-in-scalar"> [...]
[...] rely on the <link
linkend="functions-comparison-in-scalar">array</link> form of [...]
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-04-26 21:25:18 | Re: [BUGS] Breakage with VACUUM ANALYSE + partitions |
Previous Message | Bruce Momjian | 2016-04-26 20:27:37 | Re: BUG #14016: Incomplete documentation of IN subquery expression |