Are you sure?  I thought all that autocommit meant was that a statement that
is not enclosed within a begin/commit is automatically committed after it is
run.  So, in the this case all three queries will be independent, unless the
first statements is a 'begin;' and the last is a 'commit;'...

Chris

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Eisentraut
> Sent: Friday, 31 August 2001 1:57 AM
> To: Rene Pijlman
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [HACKERS] Multiple semicolon separated statements and
> autocommit
>
>
> 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.
>
> --
> Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to