Re: passing parameters to multiple statements

Поиск
Список
Период
Сортировка
Искать
От
Pavel Stehule
Тема
Re: passing parameters to multiple statements
Дата
Msg-id
162867790911160024u581073c2j52c2e7ce037bd6da@mail.gmail.com
Ответ на
Список
Дерево обсуждения
passing parameters to multiple statements Konstantin Izmailov <pgfizm@gmail.com>
Re: passing parameters to multiple statements Pavel Stehule <pavel.stehule@gmail.com>
Re: passing parameters to multiple statements manitou-sig@sd-9404.dedibox.fr
Re: passing parameters to multiple statements Konstantin Izmailov <pgfizm@gmail.com>
Re: passing parameters to multiple statements David Fetter <david@fetter.org>
Re: passing parameters to multiple statements Ivan Sergio Borgonovo <mail@webthatworks.it>
Re: passing parameters to multiple statements Pavel Stehule <pavel.stehule@gmail.com>
Re: passing parameters to multiple statements Ivan Sergio Borgonovo <mail@webthatworks.it>
Re: passing parameters to multiple statements Pavel Stehule <pavel.stehule@gmail.com>
advocating pgsql was:passing parameters to multiple statements Ivan Sergio Borgonovo <mail@webthatworks.it>
Re: passing parameters to multiple statements Konstantin Izmailov <pgfizm@gmail.com>
Re: passing parameters to multiple statements Pavel Stehule <pavel.stehule@gmail.com>
Re: passing parameters to multiple statements "Daniel Verite" <daniel@manitou-mail.org>
Re: passing parameters to multiple statements Thomas Kellerer <spam_eater@gmx.net>
Hello

2009/11/16 Konstantin Izmailov :
> I'm planning to use multiple statements via libpq. Before starting coding
> I'm trying to understand are there any limitations on passing parameters.
> E.g. would the following work:
>   PQexecParams(conn, "BEGIN;INSERT INTO tbl VALUES($1,$2);SELECT
> lastval();SELECT * INTO AUDIT FROM (SELECT $3, 'tbl action',
> lastval());COMMIT;", 3, ...);
>

sorry, it is not direct reply on your question, but why don't you  use
simply stored procedure?

btw. It looks like case for trigger
did you know RETURNING clause?

your code is very cumbrous

Regards
Pavel Stehule

> Thank you!
В списке pgsql-general по дате отправления
От: Boszormenyi Zoltan
Дата:
От: Malm Paul
Дата:
Сообщение: dumping parts of a database
FAQ