Translate This Mysql Query To Pygresql
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 any documentation f
Solution 1:
SELECT *
FROM photos
WHERE (
SELECT SUM(((phash::bigint # 2061756291569501157) >> bit) & 1)
FROM generate_series(0, 63) bit
) <= 15
Post a Comment for "Translate This Mysql Query To Pygresql"