I\'m working on a Ruby app which uses the mysql functions XOR (^) and BIT_COUNT(). However I now need to run the app on Heroku, which runs PyGreSQL.
I can\'t find an
SELECT * FROM photos WHERE ( SELECT SUM(((phash::bigint # 2061756291569501157) >> bit) & 1) FROM generate_series(0, 63) bit ) <= 15