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

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: ResultSetMetaData.isNullable(i) and outer joined columns
Дата
Msg-id CADK3HH+4w=F7p82zpFDwGb14w3zJ6Z+HH==7a6Xx1TyeK2SJQA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ResultSetMetaData.isNullable(i) and outer joined columns  (Craig Ringer <ringerc@ringerc.id.au>)
Список pgsql-jdbc
I am fairly sure that there is no way to tell from the result set if
the column isNullable or not.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On Thu, Oct 11, 2012 at 9:21 PM, Craig Ringer <ringerc@ringerc.id.au> wrote:
> 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?
>
> http://docs.oracle.com/javase/7/docs/api/java/sql/ResultSetMetaData.html#isNullable(int)
>
> 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 по дате отправления:

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