Re: Invoking a function within a batch statement - Mailing list pgsql-jdbc

From Vladimir Sitnikov
Subject Re: Invoking a function within a batch statement
Date
Msg-id CAB=Je-Gw2UtyFF0rR0FKTA8J_m9U0XGmt1mz5pSwt89MTwpB+A@mail.gmail.com
Whole thread Raw
In response to Re: Invoking a function within a batch statement  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
Evan>Using `{append_to_time_series(...)}` results in a o.p.u.PSQLException with message 'ERROR: syntax error at or near "{"'

My guess is CallableStatement was not used, thus no replacement of { ... } was made, thus backend did receive those curly braces.

I'm not sure if SqlObject can do con.prepareCall instead of con.prepareStatement

Evan>That works! In fact, on 9.4.1210-SNAPSHOT, it works with and without the @GetGeneratedKeys annotation

That sounds strange to me, and I don't think that kind of test is in pgjdbc's regression suite.
Evan, it would be great if you could provide a self-contained test case that fails with "pre 1210" version so we won't accidentally break that behavior.

Vladimir

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Invoking a function within a batch statement
Next
From: Vitalii Tymchyshyn
Date:
Subject: Re: Invoking a function within a batch statement