Skip site navigation (1) Skip section navigation (2)

DatabaseMetaData.getTables()

From: Jason Davies <jason(at)netspade(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: DatabaseMetaData.getTables()
Date: 2001-10-28 00:25:49
Message-ID: 20011027192549.A22184@netspade.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Hi,

There seems to be a problem with DatabaseMetaData.getTables() when I do the following:

ResultSet R=conn.getMetaData().getTables(null, null, "%", null);

It throws a NullPointerException:

java.lang.NullPointerException
	at org.postgresql.jdbc2.DatabaseMetaData.getTables(DatabaseMetaData.java:1732)
	at Test.main(Test.java:66)

Looking at the source, ResultSet.getBytes() is called and it returns null, causing this exception to be thrown. However I can use ResultSet.getString() without a problem. I'm using 7.1.3 at the moment. Does ResultSet.getBytes() need to be fixed or should getTables() be modified?

I'd be grateful for any insights. Or you can just tell me to use the latest cvs version of PostgreSQL :) What is the consensus on supporting older versions, will you phase out old code when 7.2 comes out?

-- 
Jason Davies

jason(at)netspade(dot)com

Responses

pgsql-jdbc by date

Next:From: User OneDate: 2001-10-28 07:33:07
Subject: JDBC SQLCodes or Error Numbers - Or how to handle errors
Previous:From: Shin-Chang HuangDate: 2001-10-27 20:23:59
Subject: Question!!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group