Re: updatable (J2EE) resultsets - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: updatable (J2EE) resultsets
Date
Msg-id Pine.LNX.4.33.0212111628340.32482-200000@leary.csoft.net
Whole thread Raw
In response to Re: updatable (J2EE) resultsets  (Fernando Nasser <fnasser@redhat.com>)
Responses Re: updatable (J2EE) resultsets  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
The following adds support for updateable ResultSets with a mixed case
table name and column names.

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.

On Tue, 10 Dec 2002, Fernando Nasser wrote:

> Dave Cramer wrote:
> > 1) why do you want to use mixed case columns. Postgres supports them but
> > not very well.
> >
>
> Dave,
>
> Can you be more specific?  Don't the PostgreSQL delimited identifiers do
> the trick?
>
> We are already talking about a 7.4 release.  is there something that
> could be done to improve this?
>
> Regards,
> Fernando
>
>
>
> --
> Fernando Nasser
> Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

Attachment

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: DatabaseMetaData problems.
Next
From: "Alvaro Escobar"
Date:
Subject: JDBC