Re: Multiple semicolon separated statements and autocommit

From: Rene Pijlman <rene(at)lab(dot)applinet(dot)nl>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: <pgsql-hackers(at)postgresql(dot)org>, <barry(at)xythos(dot)com>
Subject: Re: Multiple semicolon separated statements and autocommit
Date: 2001-08-30 19:07:21
Message-ID: 1m3totsnetvqdls8qgqdholejlj62bm7v1@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)lab(dot)applinet(dot)nl>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-08-30 22:43:25 Re: Escaping strings for inclusion into SQL queries
Previous Message Peter Eisentraut 2001-08-30 17:56:53 Re: Multiple semicolon separated statements and autocommit