Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 107619FB3CD for ; Tue, 5 Jun 2007 08:59:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 26727-06 for ; Tue, 5 Jun 2007 08:59:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 3D1C09FC914 for ; Tue, 5 Jun 2007 08:32:12 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.planwerk6.de (taube.planwerk6.de [88.198.1.9]) by svr4.postgresql.org (Postfix) with ESMTP id 1A9285AF034 for ; Tue, 5 Jun 2007 11:02:22 +0000 (GMT) Received: from localhost (taube.planwerk6.de [127.0.0.1]) by mail.planwerk6.de (Postfix) with ESMTP id 28C9C85C2DB for ; Tue, 5 Jun 2007 13:02:14 +0200 (CEST) Received: from mail.planwerk6.de ([127.0.0.1]) by localhost (mail.planwerk6.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06132-05 for ; Tue, 5 Jun 2007 13:02:13 +0200 (CEST) Received: from [192.168.1.7] (pd95b4e37.dip0.t-ipconnect.de [217.91.78.55]) (using TLSv1 with cipher EXP1024-RC4-SHA (56/128 bits)) (No client certificate requested) by mail.planwerk6.de (Postfix) with ESMTP id D593B85C125 for ; Tue, 5 Jun 2007 13:02:13 +0200 (CEST) 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 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200706051302.57899.mljv@planwerk6.de> X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at planwerk6.de X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.962 tagged_above=0 required=5 tests=BAYES_50=0.001, NO_REAL_NAME=0.961 X-Spam-Level: X-Archive-Number: 200706/17 X-Sequence-Number: 17079 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 comment= s=20 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=FCr den Parameter 2 wurde k= ein=20 Wert angegeben.=20 ["No value for parameter 2 was specified"] Hibernate send the following string to the driver:=20 /*=20 from customers As cu=20 where cu.name =3D ? */ select [...] from Customer customer0_ where customer0_.customer0_name=3D? the driver doesnt see that the first "?" is inside a comment. That's my gue= ss=20 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 g= ot=20 the same kind of bug. if i can help to track down this bug, please contact me via PM. =2D-=20 kind regards, janning