Redshift JDBC error on updating value of any row

Hello,

So I got the newest RedShift JDBC driver here, which is "JDBC 4.2–compatible driver".

I have configured it with class: com.amazon.redshift.jdbc42.Driver, Dialect: PostgreSQL with the appropriate Driver file. I *can* connect successfully and query without problems.

However the update value feature does not work. It did work before but after some DataGrip software update (I didn't change JDBC or Redshift server version for months) it broke. Sorry I didn't know which exact version of DataGrip broke this because I ceased to work on RedShift for a while.

SQL

UPDATE "master"."playlists" t SET t."enabled" = ? WHERE t."id" = ?

The error

[42601][500310] [Amazon](500310) Invalid operation: syntax error at or near "t";
java.lang.RuntimeException: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: syntax error at or near "t";
at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(ErrorResponse.java:1830)
at com.amazon.redshift.client.PGMessagingContext.handleErrorResponse(PGMessagingContext.java:822)
at com.amazon.redshift.client.PGMessagingContext.handleMessage(PGMessagingContext.java:647)
at com.amazon.jdbc.communications.InboundMessagesPipeline.getNextMessageOfClass(InboundMessagesPipeline.java:312)
at com.amazon.redshift.client.PGMessagingContext.doMoveToNextClass(PGMessagingContext.java:1080)
at com.amazon.redshift.client.PGMessagingContext.getParameterDescription(PGMessagingContext.java:996)
at com.amazon.redshift.client.PGClient.prepareStatement(PGClient.java:1857)
at com.amazon.redshift.dataengine.PGQueryExecutor.<init>(PGQueryExecutor.java:106)
at com.amazon.redshift.dataengine.PGDataEngine.prepare(PGDataEngine.java:208)
at com.amazon.jdbc.common.SPreparedStatement.<init>(Unknown Source)
at com.amazon.jdbc.jdbc41.S41PreparedStatement.<init>(Unknown Source)
at com.amazon.jdbc.jdbc42.S42PreparedStatement.<init>(Unknown Source)
at com.amazon.redshift.core.jdbc42.PGJDBC42PreparedStatement.<init>(PGJDBC42PreparedStatement.java:48)
at com.amazon.redshift.core.jdbc42.PGJDBC42ObjectFactory.createPreparedStatement(PGJDBC42ObjectFactory.java:122)
at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source)
at com.amazon.jdbc.common.SConnection.prepareStatement(Unknown Source)
at com.intellij.database.remote.jdbc.impl.RemoteConnectionImpl.prepareStatement(RemoteConnectionImpl.java:268)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

Update boolean (check / uncheck) works well. 

SQLBench works well in this matter, but I want to use DataGrip.

Thanks in advance

1 comment
Comment actions Permalink

Seems like alias breaks the deal

https://youtrack.jetbrains.com/issue/DBE-3139

 

Try to remove "t"

0

Please sign in to leave a comment.