Re: ResultSetMetaData.getTableName() == null - Mailing list pgsql-jdbc

From Philip Yarra
Subject Re: ResultSetMetaData.getTableName() == null
Date
Msg-id 45133DE5.4030100@utiba.com
Whole thread Raw
In response to ResultSetMetaData.getTableName() == null  (Alex Stienstra <alex.stienstra@zonnet.nl>)
Responses Re: ResultSetMetaData.getTableName() == null
List pgsql-jdbc
Hi Alex,

Alex Stienstra wrote:
> GetTableName() always returns null. Can someone tell me if this is
> considered to be a problem and if so when it will be fixed.

Are you sure it's really null? According to the javadoc for
ResultSetMetaData, getTableName() may return "" - see
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html#getTableName(int).

I did a quick test app, and the driver version I'm using
(postgresql-8.1-404.jdbc3.jar) returns "". If you get different, tell me
which driver version you're using and I'll try that.

I don't know why it returns "" - perhaps someone else can answer that.
Mind you, Oracle 10g does the same. Sybase ASE 12.5 is the only DB I
have access to where I get a non-empty table name.

Regards, Philip.

--
Philip Yarra
Senior Software Engineer, Utiba Pty Ltd
philip@utiba.com

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: CachedRowSetXImpl() and PostgreSQL
Next
From: Oliver Jowett
Date:
Subject: Re: ResultSetMetaData.getTableName() == null