passing parameters to multiple statements

From: Konstantin Izmailov <pgfizm(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: passing parameters to multiple statements
Date: 2009-11-16 05:30:01
Message-ID: 72746b5e0911152130l3dcd465bj2b9c1b0b8a2481d2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Thank you!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Lew 2009-11-16 05:38:29 Re: Config help
Previous Message Konstantin Izmailov 2009-11-16 05:10:44 Re: "money" binary representation