Identifiers option is always lower-cased even when overriden.

Description

Given the following query:

(jdbc/with-db-connection [conn db/pool]
(jdbc/query conn ["SELECT created_at as createdAt FROM queues"] {:identifiers identity})))

Expected result:

({:createdAt #inst "2017-11-03T15:23:57.004235000-00:00"})

Actual result:

({:createdat #inst "2017-11-03T15:23:57.004235000-00:00"})

Note, identifiers is being called, as doing clojure.string/upper-case works. But the issue seems to be that the values are already lower-cased prior to my :identifiers override being invoked.

Environment

Mac OSX
[org.clojure/clojure "1.9.0-beta4"]
[org.clojure/java.jdbc "0.7.3"]
[org.postgresql/postgresql "42.1.4.jre7"]
[hikari-cp "1.8.1"]

Activity

Show:

Sean CorfieldNovember 3, 2017 at 9:07 PM

When I do the exact same test with PostgreSQL, the columns come back in lowercase – so this must be a PostgreSQL-specific behavior: the columns are already lowercase by the time java.jdbc sees them. You can tell PostgreSQL to respect the case of column names if you double-quote them:

So, not a java.jdbc issue.

Sean CorfieldNovember 3, 2017 at 8:58 PM

I can't reproduce this with MySQL:

I will try with PostgeSQL...

Declined

Details

Assignee

Reporter

Priority

Created November 3, 2017 at 8:32 PM
Updated December 29, 2017 at 8:08 PM
Resolved December 29, 2017 at 8:08 PM