Re: bytea bitwise logical operations implementation (xor / and / or / not)

Поиск
Список
Период
Сортировка
От Darafei "Komяpa" Praliaskouski
Тема Re: bytea bitwise logical operations implementation (xor / and / or / not)
Дата
Msg-id CAC8Q8tKn0M5D5pRiJA8fguzfXnvEoiAm0e4qzjqHbTqAOTK8RA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: bytea bitwise logical operations implementation (xor / and / or/ not)  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
Hello,

working with binary is certainly lacked in Postgres.

I would be happy if these can be pulled in to Postgres, as there's not always a possibility to install a C based extension, and bit tricks are needed for efficient SQL-level implementations of custom datatypes.

Another bitwise thing,  when I was implementing a custom interval type, I lacked a way to set bits from i to j in bit vector. It's probably doable with clever and-or-xor tricks, but that would imply a lot of allocations of temporary bit vectors.

For reference, it was subset of OpenStreetMap opening_hours spec implementation.
Implementation I came up with:

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Khandekar
Дата:
Сообщение: Re: [HACKERS] UPDATE of partition key
Следующее
От: Ildar Musin
Дата:
Сообщение: Minor fix for pgbench documentation