X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 97A149DC949 for ; Wed, 1 Feb 2006 14:59:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08351-07 for ; Wed, 1 Feb 2006 14:59:44 -0400 (AST) Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 40CD89DC85F for ; Wed, 1 Feb 2006 14:59:42 -0400 (AST) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr4.postgresql.org (Postfix) with SMTP id ECC435AF03C for ; Wed, 1 Feb 2006 18:59:42 +0000 (GMT) Received: (qmail 9827 invoked by uid 1112); 1 Feb 2006 18:59:36 -0000 Date: Wed, 1 Feb 2006 13:59:36 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Senden Kris Cc: pgsql-jdbc@postgresql.org Subject: Re: Prepared Statement is not parsed correctly In-Reply-To: <295D4D9E63960946B5A8BB383C51E06E9C3AC6@rls03exc01.rls03.realsoftwaregroup.com> Message-ID: References: <295D4D9E63960946B5A8BB383C51E06E9C3AC6@rls03exc01.rls03.realsoftwaregroup.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.083 required=5 tests=[AWL=0.083] X-Spam-Score: 0.083 X-Spam-Level: X-Archive-Number: 200602/11 X-Sequence-Number: 14608 On Wed, 1 Feb 2006, Senden Kris wrote: > Recently we discovered a defect in the jdbc driver of PostgreSQL. It is > detected in version 8.1dev-401 and also found in all later versions. The > problem is that we had a faulty SQL statement in our code that was > partly executed by the jdbc-driver without any warning or error log. > The statement is > > SELECT * FROM POSTransaction WHERE DatTransEnd = (SELECT > MAX(DatTransEnd) FROM POSTransaction WHERE IdtCheckout = 9 AND > FlgTraining = ?) AND IdtCheckout = 9 AND FlgTraining = ?) ORDER BY > HouTransEnd DESC > > When executing the same query in pgAdmin III Query, I got a syntax > error : ERROR: syntax error at or near ")" at character 136. > I would expected to have the same syntax error using the prepared > statement. > Fixed in cvs for 8.0, 8.1, and HEAD. New 8.1 jars available here: http://www.ejurka.com/pgsql/jars/sk/ Kris Jurka