From: | "PostgreSQL Bugs List" <pgsql-bugs(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1155: AbstractJdbc2ResultSet:parseQuery ; in tablename |
Date: | 2004-05-22 16:58:16 |
Message-ID: | 20040522165816.32E28CF686F@www.postgresql.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1155
Logged by: David Brownlee
Email address: abs(at)mono(dot)org
PostgreSQL version: 7.4
Operating system: NetBSD
Description: AbstractJdbc2ResultSet:parseQuery ; in tablename
Details:
In AbstractJdbc2ResultSet:parseQuery can end up leaving a ; on the end of a
tablename, which when later used in isUpdateable() will choke.
The following 'fixes' it:
--- org/postgresql/jdbc2/AbstractJdbc2ResultSet.java.orig 2004-05-21
12:54
:29.000000000 +0100
+++ org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
@@ -1448,7 +1450,7 @@ public abstract class AbstractJdbc2Resul
{
if (name.toLowerCase().equals("from"))
{
- tableName = st.nextToken();
+ tableName =
st.nextToken().replaceAll(";
", "");
tableFound = true;
}
This was found while writing a small java tool to copy the contents of one
database to another, which can be provided to demonstrate the problem on
request. Would have attached it here if there had been an option :)
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2004-05-24 19:05:02 | Re: BUG #1155: AbstractJdbc2ResultSet:parseQuery ; in tablename |
Previous Message | Michael Meskes | 2004-05-22 11:26:43 | Re: Embedded SQL library bug |