proposal concerning the bug about updating a table named "two words" - Mailing list pgsql-jdbc

From Ulrich Meis
Subject proposal concerning the bug about updating a table named "two words"
Date
Msg-id 200410101804.53076.kenobi@halifax.rwth-aachen.de
Whole thread Raw
List pgsql-jdbc
Back in may I posted that bug and I keep running into it and merging my fix
with new versions, so I thought I'd write a jdk 1.2 compliant fix and I hope
you will consider incorporating it.

I don't know how thinks like this are handled here, but I attached my
implementation of a simple parser class.
The parseQuery method in org.postgresql.jdbc2.AbstractResultSet determines two
things: tableName and singleTable.

I included a little main method that checks queries you enter and outputs
singleTable and tableName.

Currently, I can't think of any shortcomings of my code within sql standard.

Shortcomings of the current implementation are things like

select foo from "two word"
select foo from bar join tender
select foo as "foo from bar" from bar
select foo from bar union select ...

If you like the code I would be happy to write a patch for
AbstractJdbc2ResultSet

Kind Regards,

Uli

Attachment

pgsql-jdbc by date:

Previous
From: Jeffrey Tenny
Date:
Subject: setFetchSize() not working
Next
From: Oliver Jowett
Date:
Subject: Re: setFetchSize() not working