Skip site navigation (1) Skip section navigation (2)

Potential inconsistency in handling of timestamps

From: "Vaibhav Nivargi" <vaibhav(dot)nivargi(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Potential inconsistency in handling of timestamps
Date: 2007-10-25 22:00:11
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
  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/ 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,


pgsql-jdbc by date

Next:From: Oliver JowettDate: 2007-10-25 22:18:32
Subject: Re: Potential inconsistency in handling of timestamps
Previous:From: Frank HabermannDate: 2007-10-25 21:51:33
Subject: multiple connections to db over jsp

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group