Обсуждение: Set autocommit to off

Поиск
Список
Период
Сортировка

Set autocommit to off

От
Aliomar Mariano Rego
Дата:
Does somebody knows why the Postgresql 7.4.8 or later doesn't supports
the option "SET AUTOCOMMIT TO OFF"?

Thanks.


Re: Set autocommit to off

От
Sean Davis
Дата:
On 8/17/05 4:24 AM, "Aliomar Mariano Rego" <aliomar.rego@embrapa.br> wrote:

> Does somebody knows why the Postgresql 7.4.8 or later doesn't supports
> the option "SET AUTOCOMMIT TO OFF"?

See this message:

http://archives.postgresql.org/pgsql-general/2005-07/msg00064.php

In short, server-side autocommit is not possible after 7.3, I think.

Instead, use a transaction block (BEGIN...COMMIT) or set it on the client
side like this in psql:

http://www.postgresql.org/docs/8.0/interactive/app-psql.html and search for
autocommit.

Hope that helps....
Sean


Re: Set autocommit to off

От
Andreas Kretschmer
Дата:
Aliomar Mariano Rego <aliomar.rego@embrapa.br> schrieb:

> Does somebody knows why the Postgresql 7.4.8 or later doesn't supports
> the option "SET AUTOCOMMIT TO OFF"?

\set AUTOCOMMIT off

works fine in 8.0.3


Regards, Andreas
--
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung.   Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org)     GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)

Re: Set autocommit to off

От
Michael Fuhr
Дата:
On Wed, Aug 17, 2005 at 08:24:00AM +0000, Aliomar Mariano Rego wrote:
> Does somebody knows why the Postgresql 7.4.8 or later doesn't supports
> the option "SET AUTOCOMMIT TO OFF"?

Because server-side autocommit was a bad idea.  See the 7.4 Release Notes.

http://www.postgresql.org/docs/7.4/static/release-7-4.html

"The server-side autocommit setting was removed and reimplemented
in client applications and languages.  Server-side autocommit was
causing too many problems with languages and applications that
wanted to control their own autocommit behavior, so autocommit was
removed from the server and added to individual client APIs as
appropriate."

--
Michael Fuhr

Re: Set autocommit to off

От
Tino Wildenhain
Дата:
Andreas Kretschmer schrieb:
> Aliomar Mariano Rego <aliomar.rego@embrapa.br> schrieb:
>
>
>>Does somebody knows why the Postgresql 7.4.8 or later doesn't supports
>>the option "SET AUTOCOMMIT TO OFF"?
>
>
> \set AUTOCOMMIT off
>
> works fine in 8.0.3

yes, buts psql, not the backend :-)

Re: Set autocommit to off

От
Aliomar Mariano Rego
Дата:
Michael Fuhr escreveu:

>On Wed, Aug 17, 2005 at 08:24:00AM +0000, Aliomar Mariano Rego wrote:
>
>
>>Does somebody knows why the Postgresql 7.4.8 or later doesn't supports
>>the option "SET AUTOCOMMIT TO OFF"?
>>
>>
>
>Because server-side autocommit was a bad idea.  See the 7.4 Release Notes.
>
>http://www.postgresql.org/docs/7.4/static/release-7-4.html
>
>"The server-side autocommit setting was removed and reimplemented
>in client applications and languages.  Server-side autocommit was
>causing too many problems with languages and applications that
>wanted to control their own autocommit behavior, so autocommit was
>removed from the server and added to individual client APIs as
>appropriate."
>
>
>
Thanks for your help. I had to install Dspace release 1.3.1
(http://sourceforge.net/projects/dspace/) and during the installation
process I have had an error "SET AUTOCOMMIT TO OFF is no longer
supported" at Postgresql-7.4.8 and Postgresql-8.0.3. So I installed
Postgres-7.3.10 and everything worked well.

Thanks for your attention.