Re: (How to) Make SQLData of UUID?
Basil Bourque <[email protected]> Sun, 21 Jul 2019 16:08:58 -0700
| Newsgroups | gmane.comp.db.postgresql.jdbc |
|---|---|
| Message-ID | <[email protected]> |
> 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