Create a unique hexidecimal based hash id using a postgresql function

select gen_random_uuid ()::text;

select translate(gen_random_uuid ()::text,'-','');

select translate('abc-def', '-', '');

select length(gen_random_uuid ()::text);

select length(translate(gen_random_uuid ()::text,'-',''));

 

Leave a Comment

Scroll to Top