X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E074B9F9430 for ; Mon, 15 May 2006 01:10:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 01853-05 for ; Mon, 15 May 2006 01:10:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id 4E94F9F944D for ; Mon, 15 May 2006 01:10:44 -0300 (ADT) Received: (qmail 27733 invoked by uid 1112); 15 May 2006 04:10:42 -0000 Date: Sun, 14 May 2006 23:10:42 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: "J." cc: pgsql-jdbc@postgresql.org Subject: Re: arrays as parameters in callableStatements In-Reply-To: <20060515025606.79891.qmail@web54215.mail.yahoo.com> Message-ID: References: <20060515025606.79891.qmail@web54215.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/43 X-Sequence-Number: 15171 On Sun, 14 May 2006, J. wrote: > I've got a PL/pgSQL stored function in my database and I'm trying to > figure out how to call it from my admin script. Some of the parameters > are ArrayList objects of strings and it returns an array that I want to > read to determine what the function actually did. Here is the function > header(?): > > String[] results = stmt.getArray(1); > > I'm getting a compiler error "Incompatible Types" on the second to last > line. getArray returns a java.sql.Array, not a String[]. Also the JDBC driver does not know how to interpret array parameters that are not sent in via setArray or setObject with a java.sql.Array. Kris Jurka