Re: [7.4.6] Calling PLpgSQL stored procedures with table row

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: [7.4.6] Calling PLpgSQL stored procedures with table row
Дата
Msg-id Pine.BSO.4.56.0412151831020.741@leary.csoft.net
обсуждение исходный текст
Ответ на Re: [7.4.6] Calling PLpgSQL stored procedures with table row arguments via JDBC?  (Eli Bingham <eli@savagebeast.com>)
Список pgsql-jdbc

On Wed, 15 Dec 2004, Eli Bingham wrote:

> 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);
>

Yes, this should work fine, behind the scenes the driver rewrites

{? = call func(?)}

into:

SELECT * FROM func(?);

So you should be able to test what a CallableStatement will do directly in
SQL.

Kris Jurka

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Eli Bingham
Дата:
Сообщение: Re: [7.4.6] Calling PLpgSQL stored procedures with table row arguments via JDBC?
Следующее
От: Christine Warren
Дата:
Сообщение: Postgresql installation Errors