From: Kris Jurka <books@ejurka.com>
To: Mario Splivalo <mario.splivalo@mobart.hr>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Calling functions with table-based-type parametars
Date: Mon, 26 Feb 2007 11:53:35 -0500 (EST)
Message-ID: <Pine.BSO.4.64.0702261150440.21753@leary.csoft.net> (raw)
In-Reply-To: <1172506356.8206.27.camel@localhost.localdomain>
References: <1172246374.23787.25.camel@localhost.localdomain>
<Pine.BSO.4.64.0702231415300.13688@leary.csoft.net>
<1172506356.8206.27.camel@localhost.localdomain>
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] <jura> SELECTERROR: function
> f1(record) does not exist
> 2007-02-26 16:58:19.004 CET [9592] <jura> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, mario.splivalo@mobart.hr
Subject: Re: Calling functions with table-based-type parametars
In-Reply-To: <Pine.BSO.4.64.0702261150440.21753@leary.csoft.net>
References: <1172246374.23787.25.camel@localhost.localdomain> <Pine.BSO.4.64.0702231415300.13688@leary.csoft.net> <1172506356.8206.27.camel@localhost.localdomain> <Pine.BSO.4.64.0702261150440.21753@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox