| От | Vik Fearing |
|---|---|
| Тема | Re: Wrong result with constant quals |
| Дата | |
| Msg-id | 7c352569-be76-e796-dc7f-de28cfa0fe3e@postgresfriends.org обсуждение |
| Ответ на | Re: Wrong result with constant quals (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-bugs |
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
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера