Re: Multiple semicolon separated statements and autocommit - Mailing list pgsql-hackers

From Rene Pijlman
Subject Re: Multiple semicolon separated statements and autocommit
Date
Msg-id 1m3totsnetvqdls8qgqdholejlj62bm7v1@4ax.com
Whole thread Raw
In response to Re: Multiple semicolon separated statements and autocommit  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On Thu, 30 Aug 2001 19:56:53 +0200 (CEST), you wrote:
>Rene Pijlman writes:
>> If autocommit is _enabled_ and S1;S2;S3 is send to the database,
>> what exactly is the behaviour of the backend? For example, what
>> happens if S1 succeeds, S2 fails and S3 would succeed?
>
>All three commands are executed in a single transaction.  So if S2 fails,
>S3 would not be executed.

And both S1 and S2 will be rolled back, as I understand it. 

Thank you.

Regards,
René Pijlman <rene@lab.applinet.nl>


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Multiple semicolon separated statements and autocommit
Next
From: Bruce Momjian
Date:
Subject: Re: Escaping strings for inclusion into SQL queries