1 2 3 4 5 6 7 8 9
CREATE OR REPLACE FUNCTION gen_uuid() RETURNS VARCHAR AS ' BEGIN RETURN upper(cast(uuid_generate_v4() AS VARCHAR)); END; ' LANGUAGE plpgsql;