Bug and Bugfix for the jdbc-driver

From: "Tilo Levante" <tilo(at)levante(dot)de>
To: <pgsql-bugs(at)postgresql(dot)org>
Cc: "Tilo Levante" <tilo(at)levante(dot)de>
Subject: Bug and Bugfix for the jdbc-driver
Date: 2001-02-02 23:23:53
Message-ID: 001201c08d6f$34c006a0$410010ac@azurit
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

In the datamodeller of JBuilder 4, only the systemtables are shown.
The Problem is in the funtion

getTableTypes() in the file
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java

This function should return a list of TableTypes. But it resturns a list of
6 Identical entries
(SYSTEM INDEX) instead.

I exchanged 2 lines of code to fix the problem. it works fine at my place.

here is the modified funtion:

public java.sql.ResultSet getTableTypes() throws SQLException
{
Field f[] = new Field[1];
Vector v = new Vector();
f[0] = new Field(connection,new String("TABLE_TYPE"),iVarcharOid,32);
for(int i=0;i<getTableTypes.length;i++) {
byte[][] tuple = new byte[1][0];
tuple[0] = getTableTypes[i][0].getBytes();
v.addElement(tuple);
}
return new ResultSet(connection,f,v,"OK",1);
}

The lines
for(int i=0;i<getTableTypes.length;i++) {
byte[][] tuple = new byte[1][0];
are exchanged.

This Fix doesn't solve all problems with JBuilder4.

Gretings

tilo
tilo(at)levante(dot)de

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Mount 2001-02-03 11:27:33 Re: JDBC ResultSet.getObject() fails for type INTERVAL
Previous Message And. Andruikhanov 2001-02-02 09:30:50 insert char(1) type by different ways.