BUG #1561: wrong detection of number of parameters in java.sql.PreparedStatement

From: "Ingolf Knopf" <iknopf(at)csc-dd(dot)de>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1561: wrong detection of number of parameters in java.sql.PreparedStatement
Date: 2005-03-24 15:31:37
Message-ID: 20050324153137.D8C1DF0F6F@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1561
Logged by: Ingolf Knopf
Email address: iknopf(at)csc-dd(dot)de
PostgreSQL version: 8.0.1
Operating system: JDBC
Description: wrong detection of number of parameters in
java.sql.PreparedStatement
Details:

"java.sql.PreparedStatement.executeUpdate()" throws "java.sql.SQLException",
if the prepared sql-string contains '?' within a C-like comment.

Example:
select relname
from pg_class
where /*relowner = ? and*/
relname = ?

In this case, the java.sql.PreparedStatement of PostgreSQL requires two
parameters, but I have only one.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2005-03-24 18:22:51 Re: BUG #1517: SQL interval syntax is accepted by the parser,
Previous Message Tom Lane 2005-03-24 14:52:01 Re: BUG #1517: SQL interval syntax is accepted by the parser,