pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Alessandro Di Bella <aldibella@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Bug in org.postgresql.jdbc2.AbstractJdbc2Array
Date: Thu, 05 Jul 2007 18:47:35 +0100
Message-ID: <468D2EB7.3060209@enterprisedb.com> (raw)
In-Reply-To: <468D08BB.701@google.com>
References: <468D08BB.701@google.com>

Alessandro Di Bella wrote:
> Hi,
> I found a bug in the org.postgresql.jdbc2.AbstractJdbc2Array class that 
> causes the following exception when an array contains a null value:
> 
> Caused by: org.postgresql.util.PSQLException: Bad value for type date : 
> NULL
>    at 
> org.postgresql.jdbc2.TimestampUtils.loadCalendar(TimestampUtils.java:246)
>    at org.postgresql.jdbc2.TimestampUtils.toDate(TimestampUtils.java:402)
>    at 
> org.postgresql.jdbc2.AbstractJdbc2Array.getArrayImpl(AbstractJdbc2Array.java:210) 
> 
> 
> I attached a patch that fixes the problem. If you are happy with it, 
> please merge it with the HEAD stream.

Thanks!

There's a little problem with the patch; it will transform a text column 
with the string "NULL" to a null.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (4+ messages)

Message-ID: <468D2EB7.3060209@enterprisedb.com>
Permalink:  ../468D2EB7.3060209@enterprisedb.com/
Also on:    postgresql.org/message-id/468D2EB7.3060209@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: heikki@enterprisedb.com, aldibella@gmail.com
  Subject: Re: Bug in org.postgresql.jdbc2.AbstractJdbc2Array
  In-Reply-To: <468D2EB7.3060209@enterprisedb.com>
  References: <468D08BB.701@google.com> <468D2EB7.3060209@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox