Re: JDBC parameter binding not working for PL/PGSQL block JDBC3 Version 9.0-801 - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: JDBC parameter binding not working for PL/PGSQL block JDBC3 Version 9.0-801
Date
Msg-id BANLkTikUNphfgrEf70_JKaC9B3bsr_tVHw@mail.gmail.com
Whole thread Raw
In response to JDBC parameter binding not working for PL/PGSQL block JDBC3 Version 9.0-801  (Brady S Edwards <brady.s.edwards@seagate.com>)
List pgsql-jdbc
On 28 April 2011 07:35, Brady S Edwards <brady.s.edwards@seagate.com> wrote:

> When trying to setString(1,?) where the ? is in a pl/pgsql block I get an
> error.

? is not considered a parameter marker if it occurs inside a literal string.
The pl/pgsql code in your case is one big literal string (delimited by $$)

It's just the same case as "SELECT 'should this be a parameter?'",
which is a query that takes no parameters despite happening to contain
a ? character.

Oliver

pgsql-jdbc by date:

Previous
From: Brady S Edwards
Date:
Subject: JDBC parameter binding not working for PL/PGSQL block JDBC3 Version 9.0-801
Next
From: Lew
Date:
Subject: Re: O/T: Class.forName(driver) repeatedly? [Was: JDBC parameter binding not working for PL/PGSQL block JDBC3 Version 9.0-801]