Re: How to set "auto commit" off in postgresql db?

From: "Gregory Wood" <gregw(at)com-stock(dot)com>
To: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to set "auto commit" off in postgresql db?
Date: 2001-01-11 21:28:58
Message-ID: 001501c07c15$82ee32e0$7889ffcc@comstock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Someone will correct me if I'm wrong, but I'm pretty sure all you have to do
is start a transaction. Example:

begin;
create table t1 (col1 varchar(10));
insert into t1 (col1) values ('test123');
rollback;

Greg
----- Original Message -----
From: Guang Mei
To: pgsql-general(at)postgresql(dot)org
Sent: Thursday, January 11, 2001 4:02 PM
Subject: How to set "auto commit" off in postgresql db?

Hi:

It seems to me that postgresql db's default set for commit is "on". I
would like to set it to "off". How could I do that?

TIA.
----------
Here is what I got when testing:

webstore=> create table t1 (col1 varchar(10));

CREATE

webstore=> insert into t1 (col1) values ('test123');

INSERT 1006769 1

webstore=> select * from t1;

col1

---------

test123

(1 row)

webstore=> rollback;

NOTICE: ROLLBACK: no transaction in progress

ROLLBACK

webstore=> select * from t1;

col1

---------

test123

(1 row)

----------------------------------------------------------------------------
--
Get your FREE download of MSN Explorer at http://explorer.msn.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mikheev, Vadim 2001-01-11 22:10:24 RE: Re: Loading optimization
Previous Message J.H.M. Dassen (Ray) 2001-01-11 21:26:28 Re: How to set "auto commit" off in postgresql db?