pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: eric.mutta@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Bug in code sample in "8.15.5. Searching in Arrays"
Date: Sun, 24 Jul 2022 15:41:11 -0400
Message-ID: <1738247.1658691671@sss.pgh.pa.us> (raw)
In-Reply-To: <165852967722.271454.6988634580136979082@wrigleys.postgresql.org>
References: <165852967722.271454.6988634580136979082@wrigleys.postgresql.org>

PG Doc comments form <noreply@postgresql.org> writes:
> The section on array searching here:
>       https://www.postgresql.org/docs/current/arrays.html#ARRAYS-SEARCHING
> ...says "In addition, you can find rows where the array has all values equal
> to 10000 with:"  and gives the following code example:
>       SELECT * FROM sal_emp WHERE 10000 = ALL (pay_by_quarter);

Yeah ...

> ...however the docs for "ALL" over here:
> https://www.postgresql.org/docs/current/functions-comparisons.html#id-1.5.8.30.17
> ...explicitly say that "The result of ALL is “true” if all comparisons yield
> true (including the case where the array has zero elements)."

I don't see any conflict there.

			regards, tom lane





view thread (2+ messages)

Message-ID: <1738247.1658691671@sss.pgh.pa.us>
Permalink:  ../1738247.1658691671@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1738247.1658691671@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, eric.mutta@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Bug in code sample in "8.15.5. Searching in Arrays"
  In-Reply-To: <1738247.1658691671@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox