Re: ResultSetMetaData.isNullable(i) and outer joined columns - Mailing list pgsql-jdbc

From Craig Ringer
Subject Re: ResultSetMetaData.isNullable(i) and outer joined columns
Date
Msg-id 5077707F.6090502@ringerc.id.au
Whole thread Raw
In response to ResultSetMetaData.isNullable(i) and outer joined columns  (Thor Michael Støre <thormichael@gmail.com>)
Responses Re: ResultSetMetaData.isNullable(i) and outer joined columns
List pgsql-jdbc
On 10/12/2012 01:25 AM, Thor Michael Støre wrote:
Hello,

I've just noticed that ResultSetMetaData.isNullable(i) in the PostgreSQL JDBC driver doesn't reflect whether fields of result set column i may be null, but the nullability of the table column it's selected from. These may differ for result set columns that originate from a outer joined table, in which case fields may of course be null even if the source table column is not nullable, but in such cases isNullable still indicates the column is not nullable. Surely this isn't right?


Although the spec doesn't explicitly distinguish between result set and source table only the former seems sensible to me -- what I expect the isNullable return value to reflect is whether an invocation of the ResultSet.getXXX(i) methods always returns an object (or sensible primitive), if they may return null or if that's unknown.

It'll be interesting to see how other major vendors' drivers handle this.

Thanks for the test case; I'll try to find some other DBs to run it on.

--
Craig Ringer

pgsql-jdbc by date:

Previous
From: Craig Ringer
Date:
Subject: Re: bug report: slow getColumnTypeName
Next
From: Thomas Kellerer
Date:
Subject: Re: bug report: slow getColumnTypeName