Andrew Dunstan wrote:
>
> src/bin/psql/common.c has a routine that lets psql get round this, by
> not sending a BEGIN in the case of the offending statements. I have no
> idea if this might be helpful for pgadmin though.
Yeah, unfortunately it's not that we wrap the statement in a begin/end - we rely on the fact that each call to PQexec
isimplicitly a single
transaction.
We're aware of course that CREATE DATABASE can't run in a transaction
block but just turned a blind eye to that on the grounds that it was
much more likely to fail than any of the other statements following it
in the multi-statement and we weren't about to start rolling it back
ourselves anyway.
Thanks, Dave.