RE: [pgsql-es-ayuda] ¿ desactivar Autocommit ?

From: "Alberto" <alberto(at)ofisercont(dot)com>
To: <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: RE: [pgsql-es-ayuda] ¿ desactivar Autocommit ?
Date: 2006-07-26 12:18:38
Message-ID: OJEDLODHAEFCCBKAAIJDIEELCCAA.alberto@ofisercont.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Hola,
Gracias por la anotación, pero ya lo había consultado.
Por eso no sé si lo estoy haciendo mal.
La sentencia que ejecuto es:

SET AUTOCOMMIT TO OFF;
ó
SET AUTOCOMMIT = OFF;

pero me dá un error.

Un Saludo

-----Original Message-----
From: pgsql-es-ayuda-owner(at)postgresql(dot)org
[mailto:pgsql-es-ayuda-owner(at)postgresql(dot)org]On Behalf Of Agustin Casiva
Sent: miércoles, 26 de julio de 2006 12:35
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: [pgsql-es-ayuda] ¿ desactivar Autocommit ?

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

www.casivaagustin.com.ar
casivaagustin(at)gmail(dot)com

http://www.opensoftware.adcserver.net/

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Job 2006-07-26 13:26:25 Determinar Primary Key
Previous Message Damian Bonaldo 2006-07-26 12:17:31 Inicio