| От | Tom Lane |
|---|---|
| Тема | Re: Aggregate binary AND |
| Дата | |
| Msg-id | 23007.1004641279@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Aggregate binary AND ("James Orr" <james@lrgmail.com>) |
| Список | pgsql-sql |
"James Orr" <james@lrgmail.com> writes:
> Is there an aggregate binary AND function in postgres? If not, is there a
> way to write your own aggregate functions? Examples?
The aggregate would be trivial given an underlying two-argument AND
function to build it from:
regression=# create aggregate booland ( basetype = bool,
regression(# sfunc = booland, stype = bool,
regression(# initcond = 'true' );
ERROR: AggregateCreate: function 'booland(bool, bool)' does not exist
Unfortunately, it seems no one has bothered to create a functional form
of AND (the keyword-AND operator isn't a function). I'll leave that
part as an exercise for the student ...
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера