Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 82CB59FBA1B for ; Thu, 5 Jul 2007 14:48:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 76610-07 for ; Thu, 5 Jul 2007 14:48:16 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id E25E69FBFC8 for ; Thu, 5 Jul 2007 14:48:26 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id a2so591799ugf for ; Thu, 05 Jul 2007 10:48:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=B2NhLHNtQd+1gEkmeU4HEwLfVgHYWj7anr+Is5hkcsywr2bcq0ynghHu902lhk/wcAMSOe/3fz+jlnu915wQVwDKFR1HmP/Ju9mk4JiO2STIW7105NTZ/dQR4E8ckj6zgKq22fWhZBqTfwghtjb1emM3TChJR1Xj002NvzTWtAk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=B+6d6Cwa3UlV958DEn9Y9uxuZ9lRa1muThCruaVIQZ3IsY2fH79v/HSg3qHf9zKEtkJM8R1cRyTvv5RkRQw7A43Mf/b3jpacSwOk1Ubuv1YcXoNgNIOLJYtGEXsx2b8qVJErJyfGc3/JCOcpYALllMQGEEwVg7o7LANtjp5je2w= Received: by 10.78.166.7 with SMTP id o7mr4834529hue.1183657705168; Thu, 05 Jul 2007 10:48:25 -0700 (PDT) Received: from ?192.168.1.34? ( [81.109.251.155]) by mx.google.com with ESMTP id 7sm754602nfv.2007.07.05.10.48.21 (version=SSLv3 cipher=RC4-MD5); Thu, 05 Jul 2007 10:48:23 -0700 (PDT) Message-ID: <468D2EB7.3060209@enterprisedb.com> Date: Thu, 05 Jul 2007 18:47:35 +0100 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: Alessandro Di Bella CC: pgsql-jdbc@postgresql.org Subject: Re: Bug in org.postgresql.jdbc2.AbstractJdbc2Array References: <468D08BB.701@google.com> In-Reply-To: <468D08BB.701@google.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/22 X-Sequence-Number: 17196 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