Re: Invoking a function within a batch statement

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>, Evan Meagher <evan(dot)meagher(at)gmail(dot)com>
Cc: List <pgsql-jdbc(at)postgresql(dot)org>, Steven Schlansker <stevenschlansker(at)gmail(dot)com>
Subject: Re: Invoking a function within a batch statement
Date: 2016-08-23 11:24:29
Message-ID: CAB=Je-Gw2UtyFF0rR0FKTA8J_m9U0XGmt1mz5pSwt89MTwpB+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Vitalii Tymchyshyn 2016-08-23 18:25:26 Re: Invoking a function within a batch statement
Previous Message Dave Cramer 2016-08-23 11:15:07 Re: Invoking a function within a batch statement