| От | Bruno Wolff III |
|---|---|
| Тема | Re: Optimizing maximum/minimum queries (yet again) |
| Дата | |
| Msg-id | 20050409041134.GA5804@wolff.to обсуждение |
| Ответ на | Re: Optimizing maximum/minimum queries (yet again) (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
On Fri, Apr 08, 2005 at 23:40:28 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Bruno Wolff III <bruno@wolff.to> writes: > > It should be possible to make this work for bool_and and bool_or as those > > are equivalent to min and max for the boolean type. > > This would just be a matter of marking them properly in the catalogs. > > However, are they really equivalent in the corner cases? In particular, > I think boolean AND across zero input rows is probably supposed to > return TRUE, not NULL. I am not sure what the spec says, but according to how the seem to work, the answer appears to be that they are equivalent. area=> select bool_and(true) where false;bool_and ---------- (1 row) area=> select bool_or(true) where false;bool_or --------- (1 row)
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера