This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create extension "uuid-ossp"; | |
-- https://www.postgresql.org/docs/current/bloom.html | |
create extension bloom; | |
CREATE or replace FUNCTION hashuuid(u uuid) RETURNS integer AS $$ | |
DECLARE | |
a bytea := uuid_send(u); | |
BEGIN | |
RETURN (get_byte(a, 3) << 24) + (get_byte(a, 2) << 16) + (get_byte(a, 1) << 8) + get_byte(a, 0); | |
END; |