pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Senden Kris <Kris.Senden@realsoftwaregroup.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Prepared Statement is not parsed correctly
Date: Wed, 1 Feb 2006 13:59:36 -0500 (EST)
Message-ID: <Pine.BSO.4.61.0602011358400.213@leary.csoft.net> (raw)
In-Reply-To: <295D4D9E63960946B5A8BB383C51E06E9C3AC6@rls03exc01.rls03.realsoftwaregroup.com>
References: <295D4D9E63960946B5A8BB383C51E06E9C3AC6@rls03exc01.rls03.realsoftwaregroup.com>



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



view thread (2+ messages)

Message-ID: <Pine.BSO.4.61.0602011358400.213@leary.csoft.net>
Permalink:  ../Pine.BSO.4.61.0602011358400.213@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.61.0602011358400.213@leary.csoft.net

 · 

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: books@ejurka.com, Kris.Senden@realsoftwaregroup.com
  Subject: Re: Prepared Statement is not parsed correctly
  In-Reply-To: <Pine.BSO.4.61.0602011358400.213@leary.csoft.net>
  References: <295D4D9E63960946B5A8BB383C51E06E9C3AC6@rls03exc01.rls03.realsoftwaregroup.com> <Pine.BSO.4.61.0602011358400.213@leary.csoft.net>

* 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