X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 151409DCBE9 for ; Sun, 5 Mar 2006 12:26:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 49373-06 for ; Sun, 5 Mar 2006 12:26:39 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.206]) by postgresql.org (Postfix) with ESMTP id EA60F9DCA5D for ; Sun, 5 Mar 2006 12:26:36 -0400 (AST) Received: by zproxy.gmail.com with SMTP id 8so1054030nzo for ; Sun, 05 Mar 2006 08:26:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=FwpTyZS8BGXIVrHDZWZd6I6rgI8cYWFM2LUHhhjRe2S3rmAxA7pz73HPROSJPJ7l3JLROEty8YQsOaTo1rR5Cw2lFDcc3UMjFtIMsWrATPRMz8k8gZpyx1AMk/4JlH4XJ1FPXz4fSxqhq0hpplXIubJCfl9OjdYnE4E56Yureuo= Received: by 10.37.12.33 with SMTP id p33mr1938477nzi; Sun, 05 Mar 2006 08:26:36 -0800 (PST) Received: by 10.36.222.11 with HTTP; Sun, 5 Mar 2006 08:26:36 -0800 (PST) Message-ID: <7c6c1dd90603050826o12028bbej847550e44dc7c0c8@mail.gmail.com> Date: Sun, 5 Mar 2006 10:26:36 -0600 From: "Adam Zimowski" To: pgsql-jdbc@postgresql.org Subject: JDBC support for 8.1 OUT parameters MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200603/18 X-Sequence-Number: 14799 Hi, Do you know where I can find Postgres JDBC driver that supports out parameters? When I call my procedure, I'm getting: org.postgresql.util.PSQLException: A CallableStatement function was executed and the return was of type java.sql.Types=3D1111 however type java.sql.Types=3D0 was registered. I'm pretty sure the driver version I have (postgresql-8.1-405.jdbc3.jar) supports OUT only on first parameter. I've looked on the web but did not find anything. I saw a few patches, but I wasn't sure if they were it. CREATE OR REPLACE FUNCTION main.p_get_profile_simple(IN _profile_id int8, OUT _main refcursor, OUT _lookingfor refcursor, OUT _purpose refcursor) AS .... CallableStatement stmt =3D null; stmt =3D oCon.prepareCall("{ call main.p_get_profile_simple(?,?,?,?) }"); stmt.setLong(1, aMemberId); stmt.registerOutParameter(2, Types.REF); stmt.registerOutParameter(3, Types.REF); stmt.registerOutParameter(4, Types.REF); Regards, Adam