[Pgpool-general] Multi-statement queries
Guillaume Lelarge
guillaume at lelarge.info
Fri Mar 5 09:07:42 UTC 2010
Le 05/03/2010 09:45, Matthias Tief a écrit :
> Hallo,
>
> we are planning to use pgpool-II as replication solution for our
> PostgeSQL application. Currently we evaluate, whether the restriction of
> pgpool-II affect our application. In the documentation you say:
> "pgpool-II cannot process multi-statement query." What do you exactly
> mean with "multi-statement queries". As I found out you don't mean
> transactions that contain multiple statments, like BEGIN - COMMIT
> blocks. These blocks are "committed" or in case of a failure are "rolled
> back" correctly. I would appreciate if you could give me an example of
> multi-statement queries.
>
"statement1; statement2; statement3;" in a single trip to the backend.
For example:
"INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); INSERT INTO t1
VALUES (3);"
is a multi-statement query, whereas
"INSERT INTO t1 VALUES (1);"
then
"INSERT INTO t1 VALUES (2);"
then
"INSERT INTO t1 VALUES (3);"
are three one-statement queries.
pgAdmin uses this quite a lot ("SET client_encoding TO utf8; SELECT *
FROM...").
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
More information about the Pgpool-general
mailing list