Re: BUG #16511: Using '= all ( )' with empty table returns true
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #16511: Using '= all ( )' with empty table returns true |
| Дата | |
| Msg-id | 2286502.1593108037@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | BUG #16511: Using '= all ( )' with empty table returns true (PG Bug reporting form <noreply@postgresql.org>) |
| Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes:
> Given table is "task" (id uuid primary key, status text not null),
> Query "select 'b' = all (select status from task where status = 'a')"
> returns true if table "task" is empty
Why do you think that's wrong? It matches usual mathematical practice,
and even if you dispute that, the SQL standard is quite explicit about it:
1) Let R be the result of the <row value constructor> and let T be
the result of the <table subquery>.
...
a) If T is empty or if the implied <comparison predicate> is
true for every row RT in T, then "R <comp op> <all> T" is
true.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера