Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AF9B59FB3A3 for ; Wed, 11 Oct 2006 10:43:17 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 17611-09 for ; Wed, 11 Oct 2006 13:43:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id 6CF119FB3A2 for ; Wed, 11 Oct 2006 10:43:12 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (p549D1B3A.dip0.t-ipconnect.de [84.157.27.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id 23BCB6599A; Wed, 11 Oct 2006 15:45:40 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id CEAC118151EB9; Wed, 11 Oct 2006 15:43:09 +0200 (CEST) Message-ID: <452CF4ED.9040301@logix-tt.com> Date: Wed, 11 Oct 2006 15:43:09 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.5 (X11/20060812) MIME-Version: 1.0 To: Bendik Rognlien Johansen Cc: pgsql-jdbc@postgresql.org Subject: Re: Retrieving arrays References: <533747B3-BC3C-4D07-A2B8-A3C86B85C718@gmail.com> <452CE6B0.10409@logix-tt.com> <02302CAD-88BF-445E-A642-40EE4266045B@gmail.com> In-Reply-To: <02302CAD-88BF-445E-A642-40EE4266045B@gmail.com> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/68 X-Sequence-Number: 15951 Hi, Bendik, Bendik Rognlien Johansen wrote: > yes you are right, I don't really understand Generics that well. But it > is a little clearer now :-) > > Anyway, I was hoping there would be a clean way to get arrays from the > result set, Generics or not, using a single method. I would like to avoid: > getStringArray, getIntegerArray etc. Usually, ResultSet.getArray() should do it. > The reason I need to do this is that I use two different drivers for > PostgreSQL with the same code, and they handle arrays differently. So you say that the the other one (pljava, IIRC) maps a postgresql integer[] to an java.lang.Integer[] in java, and not an int[] like pgjdbc? Looks strange. Does the jdbc spec promote one or the other behaviour? However, I don't know a clean solution. Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org