Skip site navigation (1) Skip section navigation (2)

Re: ¿ desactivar Autocommit ?

From: "Agustin Casiva" <casivaagustin(at)gmail(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: ¿ desactivar Autocommit ?
Date: 2006-07-26 10:34:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-es-ayuda
Espero que sirva, estaba en el manual

AUTOCOMMIT (boolean)

If set to true, PostgreSQL will automatically do a COMMIT after each
successful command that is not inside an explicit transaction block (that
is, unless a BEGIN with no matching COMMIT has been given). If set to false,
PostgreSQL will commit only upon receiving an explicit COMMIT command. This
mode can also be thought of as implicitly issuing BEGIN whenever a command
is received that is not already inside a transaction block. The default is
true, for compatibility with historical PostgreSQL behavior. However, for
maximum compatibility with the SQL specification, set it to false.

*Note: * Even with autocommit set to false, SET, SHOW, and RESET do not
start new transaction blocks. They are run in their own transactions. Once
another command is issued, a transaction block begins and any SET, SHOW, or
RESET commands are considered to be part of the transaction, i.e., they are
committed or rolled back depending on the completion status of the
transaction. To execute a SET, SHOW, or RESET command at the start of a
transaction block, use BEGIN first.

*Note: * As of PostgreSQL 7.3, setting autocommit to false is not
well-supported. This is a new feature and is not yet handled by all client
libraries and applications. Before making it the default setting in your
installation, test carefully.

On 7/26/06, Alberto <alberto(at)ofisercont(dot)com> wrote:
> Hola,
> Estoy intentando hacer bloqueos pesimistas desde C++Borland (mediante
> componentes) y no me funciona. He leido en algun foro, que para estos
> casos
> es conveniente desactivar el autocommit, pero no se como hacerlo.
> La version de PostgreSQl que estoy usando es la 8.1 (con windows).
> Saludos a todos y gracias (espero haberme explicado)
> ---------------------------(fin del mensaje)---------------------------
> TIP 3: si publicas/lees desde Usenet, por favor envía "subscribe-nomail"
>        a majordomo(at)postgresql(dot)org para que tus mensajes puedan llegar
>        a los suscriptores de la lista

Agustin Casiva - Desarrollador de Sistemas

In response to


pgsql-es-ayuda by date

Next:From: Pablo BraulioDate: 2006-07-26 10:55:09
Subject: No muestra datos si un campo relacionado está vacío.
Previous:From: AlbertoDate: 2006-07-26 09:02:58
Subject: ¿ desactivar Autocommit ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group