Re: ResultSetMetaData.isNullable(i) and outer joined columns

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: ResultSetMetaData.isNullable(i) and outer joined columns
Дата
Msg-id 5077707F.6090502@ringerc.id.au
обсуждение исходный текст
Ответ на ResultSetMetaData.isNullable(i) and outer joined columns  (Thor Michael Støre <thormichael@gmail.com>)
Ответы Re: ResultSetMetaData.isNullable(i) and outer joined columns  (Dave Cramer <pg@fastcrypt.com>)
Список 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 по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: bug report: slow getColumnTypeName
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: bug report: slow getColumnTypeName