Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 98C909FB409 for ; Mon, 26 Feb 2007 12:53:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 50988-02 for ; Mon, 26 Feb 2007 12:53:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id A4B819FB464 for ; Mon, 26 Feb 2007 12:53:35 -0400 (AST) Received: (qmail 15140 invoked by uid 1112); 26 Feb 2007 16:53:35 -0000 Date: Mon, 26 Feb 2007 11:53:35 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Mario Splivalo cc: pgsql-jdbc@postgresql.org Subject: Re: Calling functions with table-based-type parametars In-Reply-To: <1172506356.8206.27.camel@localhost.localdomain> Message-ID: References: <1172246374.23787.25.camel@localhost.localdomain> <1172506356.8206.27.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.039 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200702/130 X-Sequence-Number: 16686 On Mon, 26 Feb 2007, Mario Splivalo wrote: >> Why not conn.prepareCall("{call f1(ROW(?, ?)}") or >> conn.prepareStatement("SELECT f1(ROW(?, ?))"); > > When I try it like above (using conn.prepaleCall), i get this: > > 2007-02-26 16:58:19.004 CET [9592] SELECTERROR: function > f1(record) does not exist > 2007-02-26 16:58:19.004 CET [9592] SELECTHINT: No function > matches the given name and argument types. You may need to add explicit > type casts. This is saying you need to write it with a cast from the row to the table type: conn.prepareCall("{call f1(ROW(?, ?)::t1)}") Kris Jurka