From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | KES <kes-kes(at)yandex(dot)ru> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Ambiguous usage of 'any' in explanation |
Date: | 2018-10-12 15:04:33 |
Message-ID: | 20181012150433.GA12966@momjian.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Fri, Oct 12, 2018 at 01:42:03PM +0300, KES wrote:
> - The result is NULL if the comparison does not return true for any row,
> + The result is NULL if no comparison with a subquery row returns true,
> and it returns NULL for at least one row.
> -The result of ANY is “true” if the comparison returns true for any subquery
> row. The result is “false” if the comparison returns false for every subquery
> row (including the case where the subquery returns no rows). The result is NULL
> if the comparison does not return true for any row, and it returns NULL for at
> least one row.
>
> Similary to:
> >The result of ALL is "false" even if *at least one* row yield false
>
> +The result of ANY is "true" if at least one row yields true.
> The result of ANY is "false" if all rows yield false
> The result of ANY is NULL if no one row yelds true and at least one row yields
> NULL
> When subquery return no rows the result of ANY is "false"
>
> sentences are short, easy to spot when and how result is changed
Sorry, but I don't like this wording. The problem is that the
comparison has two row sets --- the left-hand side, and the right-hand
side. Each row on the left-hand side is compared with the row set on
the right. I also don't like people thinking about the result of ANY
since it is really <comparison> ANY that is being used.
--
Bruce Momjian <bruce(at)momjian(dot)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 +
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2018-10-12 21:37:33 | Re: Ambiguous usage of 'any' in explanation |
Previous Message | KES | 2018-10-12 10:42:03 | Re: Ambiguous usage of 'any' in explanation |