Re: [7.4.6] Calling PLpgSQL stored procedures with table row arguments via JDBC?
От | Eli Bingham |
---|---|
Тема | Re: [7.4.6] Calling PLpgSQL stored procedures with table row arguments via JDBC? |
Дата | |
Msg-id | 08F2890B-4EF0-11D9-895F-000D932A4B80@savagebeast.com обсуждение исходный текст |
Ответ на | Re: [7.4.6] Calling PLpgSQL stored procedures with table row (Kris Jurka <books@ejurka.com>) |
Ответы |
Re: [7.4.6] Calling PLpgSQL stored procedures with table row
|
Список | 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
В списке pgsql-jdbc по дате отправления: