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: https://github.com/gojuno/lostgis/blob/master/sql/types/type_opening_hours.sql Spec: https://wiki.openstreetmap.org/wiki/Key:opening_hours