You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.31651
Client Operating System
Mac OS X
JAVA/JVM version
8, 11
Problem description
Cannot send BigInteger as binding for a parameterized LIMIT. We use Clojure, and clojure uses BigInt by default for literal numbers, so the following statement sends a BigInteger as the limit:
(jdbc/query rdb ["SELECT * FROM table LIMIT ?"100])
(jdbc/query rdb ["SELECT * FROM table LIMIT ?" (int100)])
Is this expected behaviour and thus all Limit should be ensured to be ints, or is it a bug? We were not having this problem with version 1.x of the driver, we recently upgraded to 2.1 and this happened.
The text was updated successfully, but these errors were encountered:
I can reproduce via setObject(paramIndex, BigInteger.valueof(100)). As such server throws the above error when driver tries to bind as Numeric type. As a work around, I change the driver code to use BigInteger as String type as bind and it works fine. This fix will release in 2.1.0.2. This is schedule soon.
Driver version
2.1.0.1
Redshift version
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.31651
Client Operating System
Mac OS X
JAVA/JVM version
8, 11
Problem description
Cannot send BigInteger as binding for a parameterized LIMIT. We use Clojure, and clojure uses BigInt by default for literal numbers, so the following statement sends a BigInteger as the limit:
And we are receiving the following error:
When explicitly coercing to Integer, it works
Is this expected behaviour and thus all Limit should be ensured to be ints, or is it a bug? We were not having this problem with version 1.x of the driver, we recently upgraded to 2.1 and this happened.
The text was updated successfully, but these errors were encountered: