From: | Eli Bingham <eli(at)savagebeast(dot)com> |
---|---|
To: | Kris Jurka <books(at)ejurka(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: [7.4.6] Calling PLpgSQL stored procedures with table row arguments via JDBC? |
Date: | 2004-12-15 23:21:23 |
Message-ID: | 08F2890B-4EF0-11D9-895F-000D932A4B80@savagebeast.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Dec 15, 2004, at 3:10 PM, Kris Jurka wrote:
<snip>
>
>
> In plain SQL calling functions with rowtype arguments is not easy to do
> before 8.0. There is no row constructor in SQL prior to 8.0, so you
> need
> to get the row instance created via another means. Either via a SELECT
> like:
>
>
<snip>
> SELECT do_stuff(create_foobar('a','b'));
>
> where create_foobar takes two varchar arguments and returns foobar.
>
Kris,
Thanks for your speedy reply. In general, there are lots of features
that we would like to have in 8.0, but we are more comfortable
releasing on a more stable release version at the moment. We're
considering the transition to 8.0 at some point in the future. I guess
I'll add another feature to the list of things we would like to have.
;)
In regards to the specific solution that you offer above with a
function that creates row objects, would it be possible to invoke a
composed function via a CallableStatement in Postgres JDBC, like this:
CallableStatement proc = conn.prepareCall ("{ ? = call do_stuff
(create_foobar (?, ?)) }");
proc.registerOutParameter (1, Types.INTEGER);
proc.setObject (2, x);
proc.setObject (3, y);
Eli Bingham
SavageBeast Technologies
From | Date | Subject | |
---|---|---|---|
Next Message | Kris Jurka | 2004-12-15 23:37:12 | Re: [7.4.6] Calling PLpgSQL stored procedures with table row |
Previous Message | Kris Jurka | 2004-12-15 23:10:37 | Re: [7.4.6] Calling PLpgSQL stored procedures with table row |