> Any hints please?
>
Does this Answer by Gopinagh.R on Stack Overflow help?
https://stackoverflow.com/a/14197445/642706 <https://stackoverflow.com/a/14197445/642706>
CREATE OR REPLACE FUNCTION generatesurrogat() RETURNS uuid AS
$BODY$DECLARE
uid UUID;
BEGIN
uid:=(select uuid_generate_v1());
RAISE NOTICE 'My UUID is %',uid;
return uid;
END$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
—BB