Re: Multiple semicolon separated statements and autocommit
От | Christopher Kings-Lynne |
---|---|
Тема | Re: Multiple semicolon separated statements and autocommit |
Дата | |
Msg-id | ECEHIKNFIMMECLEBJFIGCELHCBAA.chriskl@familyhealth.com.au обсуждение исходный текст |
Ответ на | Re: Multiple semicolon separated statements and autocommit (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: Multiple semicolon separated statements and autocommit
|
Список | pgsql-hackers |
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: pgsql-hackers-owner@postgresql.org > [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Peter Eisentraut > Sent: Friday, 31 August 2001 1:57 AM > To: Rene Pijlman > Cc: pgsql-hackers@postgresql.org; barry@xythos.com > 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 peter_e@gmx.net http://funkturm.homeip.net/~peter > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://www.postgresql.org/search.mpl >
В списке pgsql-hackers по дате отправления: