Re: I found a bug in the jdbc driver

From: Kris Jurka <books(at)ejurka(dot)com>
To: <innuendo-nh(at)libero(dot)it>
Cc: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: I found a bug in the jdbc driver
Date: 2003-05-26 07:40:59
Message-ID: Pine.LNX.4.33.0305260328580.26009-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 22 May 2003 =?iso-8859-1?Q?innuendo-nh(at)libero(dot)it?= wrote:

> I have just found a bug in the latest jdbc driver.
>
> The error is in the class org.postgresql.jdbc2.AbstractJdbc2ResultSet
>
> the method parseQuery() has a bug:

There are a number of problems with this method. It is a very simple
function trying to do a very complicated task. I noted this in
the following message in December...

What could really use some work is the parseQuery method in
org.postgresql.jdbc2.AbstractJdbc2ResultSet. When determining if a
ResultSet can be updated it does not check that all colums of the result
set aren't derived columns. The check to make sure it is a single table
is not particularly good. It fails on things like:

SELECT CURRENT_TIMESTAMP;
SELECT a AS from FROM t;
SELECT a FROM t1 LEFT JOIN t2 ON (t1.id=t2.id);
SELECT a FROM t1 UNION SELECT a FROM t2;

I'm not sure how much this can be improved without building a full blown
parser into the driver.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Csaba Nagy 2003-05-26 08:42:18 Re: I found a bug in the jdbc driver
Previous Message Holger Klawitter 2003-05-26 06:27:13 Re: some troubles with accent by using java with postgres