Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id DD08D63373D for ; Tue, 7 Apr 2009 05:35:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 61933-04 for ; Tue, 7 Apr 2009 05:35:31 -0300 (ADT) X-Greylist: delayed 21:21:59.2096 by SQLgrey-1.7.6 Received: from mail.televork.ee (mail.televork.ee [81.21.241.190]) by mail.postgresql.org (Postfix) with ESMTP id D9C096336B3 for ; Tue, 7 Apr 2009 05:35:33 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mail.televork.ee (Postfix) with ESMTP id E8BF7185C95; Tue, 7 Apr 2009 11:35:30 +0300 (EEST) X-Virus-Scanned: at mail.televork.ee Received: from mail.televork.ee ([81.21.241.190]) by localhost (mail.televork.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5bkrHQJl0lUx; Tue, 7 Apr 2009 11:35:23 +0300 (EEST) Received: from [127.0.0.1] (81-21-242-98.televork.ee [81.21.242.98]) by mail.televork.ee (Postfix) with ESMTP id 18D0D185B39; Tue, 7 Apr 2009 11:35:23 +0300 (EEST) Subject: Re: What do people use for connection pooling with PostgreSQL JDBC From: Hannu Krosing To: Dave Cramer Cc: pgsql-jdbc@postgresql.org In-Reply-To: <491f66a50904060443o7e80fae8mfb6f403fb9a53467@mail.gmail.com> References: <1236241901.12460.6.camel@huvostro> <491f66a50903050513r46ab0531h4892e973dec51f18@mail.gmail.com> <1239016398.8411.2.camel@huvostro> <491f66a50904060443o7e80fae8mfb6f403fb9a53467@mail.gmail.com> Content-Type: text/plain Date: Tue, 07 Apr 2009 11:35:22 +0300 Message-Id: <1239093322.7647.9.camel@huvostro> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/5 X-Sequence-Number: 19452 On Mon, 2009-04-06 at 07:43 -0400, Dave Cramer wrote: > huh ? What makes you think it doesn't deal with arrays ? I have a sample function, whit takes an array argument CREATE OR REPLACE FUNCTION arraySum( multiplier bigint, valuelist bigint[], OUT result int ) AS $$ BEGIN result = 0; FOR idx IN array_lower(valuelist, 1)..array_upper(valuelist, 1) LOOP result = result + multiplier * valuelist[idx]; END LOOP; RETURN; END; $$ LANGUAGE plpgsql SECURITY DEFINER; When I call this function directly via JDBC or using proxool I get a result, when doing it via c3p0 or dbcp I get an exception - Long[] array = { 1L, 2L }; PreparedStatement ps = conn.prepareStatement( "SELECT * FROM arraySum(?, ?)"); ps.setLong(1, 3L); ps.setArray(2, conn.createArrayOf("bigint", array)); ps.execute(); -- Hannu Krosing http://www.2ndQuadrant.com PostgreSQL Scalability and Availability Services, Consulting and Training