Re: (How to) Make SQLData of UUID?

Thomas Kellerer <[email protected]> Mon, 22 Jul 2019 08:22:16 +0200
Newsgroups gmane.comp.db.postgresql.jdbc
Message-ID <[email protected]>
Alexander Myodov schrieb am 22.07.2019 um 01:43:
> The problem is not in making a PL/PgSQL function returning an UUID.
> Or even returning a custom type containing an UUID (like
> MYFUNC_RETURN_TYPE in my case). The problem is on Java level, when I
> need to make a Java handler/mapping of PostgreSQL custom type (which
> contains an UUID internally).


You don't need a wrapper. 

ResultSet.getObject(1, UUID.class)

and 

PreparedStatement.setObject(1, someUUID);

will work just fine. 

Thomas