Potential inconsistency in handling of timestamps - Mailing list pgsql-jdbc

From Vaibhav Nivargi
Subject Potential inconsistency in handling of timestamps
Date
Msg-id a16dc64a0710251500v29de2294n864ec1249829f3b0@mail.gmail.com
Whole thread Raw
Responses Re: Potential inconsistency in handling of timestamps  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
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?

Thanks in advance,
Vaibhav

pgsql-jdbc by date:

Previous
From: ahnf
Date:
Subject: auto set of read-only flag??
Next
From: Oliver Jowett
Date:
Subject: Re: Potential inconsistency in handling of timestamps