Re: Potential inconsistency in handling of timestamps

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Potential inconsistency in handling of timestamps
Дата
Msg-id 47211638.2080404@opencloud.com
обсуждение исходный текст
Ответ на Potential inconsistency in handling of timestamps  ("Vaibhav Nivargi" <vaibhav.nivargi@gmail.com>)
Ответы Re: Potential inconsistency in handling of timestamps  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Vaibhav Nivargi wrote:
> Hi,
>   I am using PG-jdbc-8.2-506 to connect to a Postgres DB with a table
> containing a timestamp column. Some entries for this are null. When I
> try to retrieve the entries, I get a Bad Value PSQLException for rows
> which have the timestamp set to null. I was able to trace it to
> org/postgresql/jdbc2/Timestamputils.java: loadCalender() which
> explicitly checks whether the timestamp has either a date or time
> value, else throws an exception.
>
> OTOH, setting a timestamp to null through jdbc (Update stmt) works
> without error. This seems like inconsistent behavior.
>
> Am I missing something? Any special settings for handling null
> timestamp/date values?

Null values should in theory get handled and returned well before
TimestampUtils ever gets invoked (see
AbstractJdbc2ResultSet.getTimestamp()). Can you supply a testcase
demonstrating the problem?

-O

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Vaibhav Nivargi"
Дата:
Сообщение: Potential inconsistency in handling of timestamps
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Potential inconsistency in handling of timestamps