On 11/4/22 01:14, Tom Lane wrote:
> Vik Fearing <vik@postgresfriends.org> writes:
>> I allowed for this by saying it could be a single group with no rows if
>> you preferred to look at it that way.
>
> That is exactly what the standard says.
>
>> This does not explain why the WHERE FALSE is being ignored and producing
>> rows.
>
> It's not ignored, but it applies to the pre-grouping rows, of which
> there aren't any to remove. But there's still a group.
Okay, I can see better what is happening with this query:
select 42
from (values (1), (2), (3)) as _
having true;
?column?
----------
42
(1 row)
--
Vik Fearing