proposal concerning the bug about updating a table named "two words"

From: Ulrich Meis <kenobi(at)halifax(dot)rwth-aachen(dot)de>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: proposal concerning the bug about updating a table named "two words"
Date: 2004-10-10 16:04:53
Message-ID: 200410101804.53076.kenobi@halifax.rwth-aachen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
QueryParser.java text/x-java 7.3 KB

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-10-10 18:25:09 Re: setFetchSize() not working
Previous Message Jeffrey Tenny 2004-10-10 14:42:36 setFetchSize() not working