bitwise operations

48 views
Skip to first unread message

Lukas Eder

unread,
Nov 4, 2011, 6:46:15 AM11/4/11
to h2-da...@googlegroups.com
Hello,

I have recently analysed various databases' compatibility as far as bitwise operations are concerned. While this is not everyday business, it's still quite useful from time to time. I noticed that H2 (as well as HSQLDB) is missing a bitwise not operation (~ in Java). It ships with BITAND, BITOR, BITXOR, but no BITNOT.

As far as I know, these operations are not in a SQL standard (I checked SQL:2008 drafts). But for compatibility it might be nice to support all of them. DB2 supports the same function names as H2, MySQL/Postgres use operators just as in Java. They also support >> and << operators for bit shifting.

Cheers
Lukas
Reply all
Reply to author
Forward
0 new messages