jdbc ResultSetMetaData::isWritable()

From: Ian Wehrman <ian(at)labfire(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: jdbc ResultSetMetaData::isWritable()
Date: 2001-09-04 03:01:17
Message-ID: 20010903220117.A20753@labfire.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

hello,
i think there's a simple error in the "isWritable" method of the
ResultSetMetaData class in the jdbc2 postgresql driver. the isWritable method
looks like this:

public boolean isWritable(int column) throws SQLException
{
if (isReadOnly(column))
return true;
else
return false;
}

and isReadOnly looks like this:

public boolean isReadOnly(int column) throws SQLException
{
return false;
}

hence, isWritable() will always return false. this is something of a problem
:) just switch the booleans in isReadOnly and everything should work just
fine. i have verified this in the 7.1.3 source, and it appears to work the
same way in at least 7.1.2 as well.

let me know if i can provide further information.

thanks,
ian wehrman

--
Labfire, Inc.
Seamless Technical Solutions
http://labfire.com/

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2001-09-04 04:12:40 Re: JAVA vs PERL : PERL wins to postgreSQL
Previous Message Dave Cramer 2001-09-04 01:11:40 Re: Read transactions don't work on 7.0.x db's