Re: passing parameters to multiple statements - Mailing list pgsql-general

From manitou-sig@sd-9404.dedibox.fr
Subject Re: passing parameters to multiple statements
Date
Msg-id b4496f92-de38-49ef-b516-3d948b3e4472@mm
Whole thread Raw
In response to passing parameters to multiple statements  (Konstantin Izmailov <pgfizm@gmail.com>)
Responses Re: passing parameters to multiple statements
List pgsql-general
    Konstantin Izmailov wrote:

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

No, because PQexecParams doesn't accept multiple SQL statements.

Best regards,
--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

pgsql-general by date:

Previous
From: John DeSoi
Date:
Subject: Re: Need full search text on a shared hosting web site using 8.1.x
Next
From: Sebastian Feher
Date:
Subject: Update on Insert