pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mljv@planwerk6.de
To: pgsql-jdbc@postgresql.org
Subject: bug with prepared statements and sql comments in 8.1-408.jdbc3
Date: Tue, 5 Jun 2007 13:02:57 +0200
Message-ID: <200706051302.57899.mljv@planwerk6.de> (raw)

Hi,

i am using hibernate3, postgresql 8.1 and pg-jdbc 8.1-408.jdbc3

when is set hibernate.use_sql_comments to true, hibernate sends sql comments 
to the postgresql driver to ease debugging.

But the driver does not recognise the comment in respect of parameters:

Caused by: org.postgresql.util.PSQLException: Für den Parameter 2 wurde kein 
Wert angegeben. 
["No value for parameter 2 was specified"]

Hibernate send the following string to the driver: 

      /* 
   from
       customers As cu 
   where
       cu.name = ? */ select
       [...]
       from
           Customer customer0_
       where
           customer0_.customer0_name=?

the driver doesnt see that the first "?" is inside a comment. That's my guess 
from reading a very similar bug report:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-521
this one was tracked down in the oracle driver, so i guess postgresql has got 
the same kind of bug.

if i can help to track down this bug, please contact me via PM.

-- 
kind regards,
janning




view thread (3+ messages)  latest in thread

Message-ID: <200706051302.57899.mljv@planwerk6.de>
Permalink:  ../200706051302.57899.mljv@planwerk6.de/
Also on:    postgresql.org/message-id/200706051302.57899.mljv@planwerk6.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mljv@planwerk6.de
  Subject: Re: bug with prepared statements and sql comments in 8.1-408.jdbc3
  In-Reply-To: <200706051302.57899.mljv@planwerk6.de>
  References: <200706051302.57899.mljv@planwerk6.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox