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

Bug in org.postgresql.jdbc2.AbstractJdbc2Array

From: Alessandro Di Bella <aldibella(at)gmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Bug in org.postgresql.jdbc2.AbstractJdbc2Array
Date: 2007-07-05 15:05:31
Message-ID: 468D08BB.701@google.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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


Alessandro


Attachment: pgjdbc-sqlarray-patch.patch
Description: text/plain (3.1 KB)

Responses

pgsql-jdbc by date

Next:From: Heikki LinnakangasDate: 2007-07-05 17:47:35
Subject: Re: Bug in org.postgresql.jdbc2.AbstractJdbc2Array
Previous:From: Heikki LinnakangasDate: 2007-07-05 12:24:32
Subject: Re: prepared statement: are they pre-compiled?

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