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

[PATCH] setTimestamp(int, Timestamp) fails on null timestamp

From: "Dejan Vucinic" <hotdejan(at)hotmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: [PATCH] setTimestamp(int, Timestamp) fails on null timestamp
Date: 2001-07-11 17:42:42
Message-ID: F1032WEnKS7vzxgLNnQ000105e9@hotmail.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Greetings,

The 7.1.2 JDBC driver has a bug in setTimestamp(int, Timestamp), it
throws a NullPointerException if the Timestamp is set to null.
Looking at the code, this seems to be the case for the other form
of setTimestamp as well, in both jdbc1/PreparedStatement.java and
jdbc2/PreparedStatement.java.  Please insert something like this at
the very beginning of the four methods:

          if (null == x) {
            set(parameterIndex, "NULL");
            return;
          }

Thanks,

--dv

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


Responses

pgsql-jdbc by date

Next:From: Bruce MomjianDate: 2001-07-11 17:43:54
Subject: Re: Re: [HACKERS] JDBC adaptor issue
Previous:From: Peter EisentrautDate: 2001-07-11 17:40:59
Subject: RE: jdbc and unix signals

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