This file contains 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 OR REPLACE FUNCTION djb2_hash(string text) | |
RETURNS bigint | |
IMMUTABLE | |
STRICT | |
LANGUAGE sql | |
AS $$ | |
WITH RECURSIVE t(seed, string) AS ( | |
VALUES ( | |
87049::bigint, | |
$1 |
NewerOlder