| От | Andrus |
|---|---|
| Тема | How to force Postgres to calculate MAX(boolean) |
| Дата | |
| Msg-id | dajail$4qn$2@news.hub.org обсуждение исходный текст |
| Ответы |
Re: How to force Postgres to calculate MAX(boolean)
Re: How to force Postgres to calculate MAX(boolean) |
| Список | pgsql-general |
I try to convert code from other database to Postgres. CREATE TABLE test(test BOOLEAN); SELECT MAX(test) FROM test; causes error ERROR: function max(boolean) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. I tried SELECT MAX(test:integer)::boolean FROM test; but this casuses error ERROR: cannot cast type boolean to integer I have lot of MAX() functions applied to boolean expressions. How to force Postgres to calculate MAX(boolean) ? MAX(boolean) should return true if its argument evaluates true for at least one row.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера