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 EXTENSION IF NOT EXISTS "uuid-ossp"; | |
-- My port of https://github.com/kurttheviking/uuid-with-v6-js | |
-- A hacky translation of: | |
-- - http://gh.peabody.io/uuidv6/ | |
-- - https://tools.ietf.org/html/draft-peabody-dispatch-new-uuid-format | |
CREATE OR REPLACE FUNCTION uuid_v1_to_v6(v1 uuid) | |
RETURNS uuid AS $$ | |
DECLARE | |
v6 text; |