Postgresql returning java class (not string) for uuids in query results

Description

Using the PostgreSQL driver (version 9.4.1212), UUID values are being returned from query results as an object instead of a string. In postgres, the companyid column is of type uuid in postgresql.

Attachments

2
  • 30 Nov 2021, 01:07 pm
  • 20 Jul 2018, 07:34 pm

Activity

Show:

JP 30 November 2021 at 17:01

+1

Brad Wood 30 November 2021 at 17:00

Thanks for helping test . I’ve never actually used an Inet column, I took the information for that from this unit test in the Postgres JDBC source code in which it appeared to operate the same as UUID

https://github.com/pgjdbc/pgjdbc/blob/f61fbfe7b72ccf2ca0ac2e2c366230fdb93260e5/pgjdbc/src/test/java/org/postgresql/test/jdbc4/jdbc41/GetObjectTest.java#L972

It’s possible the JDBC result object only gives back a proper UUID when you call getObject() like so:

rs.getObject("inet_column", InetAddress.class)

I’m just not sure of the Postgres specifics.

That said, I do think testing should be paused on this ticket because IMO it shouldn’t have even been merged yet! There was an in progress discussion between , myself, and others about whether this pull even had the logic in the proper place, or if it should actually be part of the caster. came in and hit “merge”, apparently without seeing the in-progress discussion.

After thinking on it and taking into account Igal’s input plus some new findings on how Adobe ColdFusion operates, I’m not convinced the pull was the proper way to do it anyway. I really think that discussion should be resolved before we get way ahead of ourselves testing a fix that was still being discussed!

Pothys - MitrahSoft 30 November 2021 at 13:07
Edited

I've checked this ticket with the lucee latest build 6.0.0.141-SNAPSHOT. The UUID type value comes as strings in the query. But inet type values still come as java object( org.postgresql.util.PGobject ) instead of a string.

Won't Fix

Details

Assignee

Reporter

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Fix versions

Affects versions

Priority

Created 20 July 2018 at 19:39
Updated 29 August 2022 at 13:51
Resolved 20 July 2018 at 23:31

Flag notifications