Re: parameter substitution problem in jdbc driver? (8.1)

From: Kris Jurka <books(at)ejurka(dot)com>
To: Dave E Martin <postgresql-to(dot)dave(at)dave(dot)to>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: parameter substitution problem in jdbc driver? (8.1)
Date: 2006-01-27 21:13:49
Message-ID: Pine.BSO.4.61.0601271612050.27900@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 27 Jan 2006, Dave E Martin wrote:

> When a query of this form:
>
> /* from xxx where yyy = ? */ select a,b,c,d from xxx where yyy = ?
>
> is sent to the jdbc driver (as a prepared statement), it complains that
> parameter 2 is not set. This is a query from hibernate3.1, with hibernate's
> "generate comments in sql" option turned on.
>
> Is the problem in the JDBC driver, in Hibernate, or in the JDBC spec?
>

This is the JDBC driver's fault. There are a number of places it does not
correctly detect placeholders vs. comments/text, for example dollar
quoting is another one.

Kris Jurka

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Fürst 2006-01-27 21:18:13 Re: Are rules transaction safe?
Previous Message Dave E Martin 2006-01-27 21:13:00 parameter substitution problem in jdbc driver? (8.1)