which is only a little wrong (how can a varchar be auto-increment?
but if I swap the order of the columns, e.g.
SELECT price, name
FROM "2024_05_31_e15f5997_60ab_4c7d_8fde_164a001da04c_schema"."test_data_venues"
LIMIT 1
then not only is the autoincrement version wrong, the type information for price is now wrong too:
;; price is an integer, not a serial
[{:name "price", :db-type "serial", :auto-increment? true}
{:name "name", :db-type "varchar", :auto-increment? false}]
I'm guessing this has something to do with the fact that the first column in the table id, is an auto-incrementing serial column. So maybe it's still looking at that column even tho I'm not fetching it in the queries above.
Driver version
Redshift version
Client Operating System
WSL 2/Windows 11
JAVA/JVM version
Table schema
Problem description
ResultSetMetaData
returns the wrong information depending on the order of the columns in theSELECT
. With this query:I get
which is only a little wrong (how can a
varchar
be auto-increment?but if I swap the order of the columns, e.g.
then not only is the autoincrement version wrong, the type information for
price
is now wrong too:I'm guessing this has something to do with the fact that the first column in the table
id
, is an auto-incrementing serial column. So maybe it's still looking at that column even tho I'm not fetching it in the queries above.Reproduction code
I used this Clojure code to reproduce the problem