| От | Antonio Fiol Bonnín |
|---|---|
| Тема | Re: OR-ing rows of bits |
| Дата | |
| Msg-id | 3C14F928.9010304@w3ping.com обсуждение исходный текст |
| Ответ на | OR-ing rows of bits ("Thomas T. Thai" <tom@minnesota.com>) |
| Список | pgsql-general |
Thomas T. Thai wrote: >what's the best way of OR-ing rows of bits or integers? SUM works for bits >that are all atomic (1, 2, 4, 8, ...) but not for inclusive (1, 3, 7, >...). > > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > >. > I'd bet for a custom aggregate function. Something like the ready-to-go statement CREATE AGGREGATE int4or_aggregate ( BASETYPE=int4, SFUNC=int4or, STYPE=int4 ); Hope that helps. Antonio Fiol
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера