From: Tino Schwarze <postgresql@tisc.de>
To: pgsql-admin@postgresql.org
Subject: Re: Query
Date: Sat, 19 Jul 2008 15:27:04 +0200
Message-ID: <20080719132704.GF22515@easy2.in-chemnitz.de> (raw)
In-Reply-To: <ee5ed96b0807190359w5ed01c4am5c8ff3df98951a50@mail.gmail.com>
References: <ee5ed96b0807190359w5ed01c4am5c8ff3df98951a50@mail.gmail.com>
On Sat, Jul 19, 2008 at 04:29:00PM +0530, Kartik wrote:
> hello there,i am new to postgresql
> i am using postgresql 8.3.3 and i am writing one whole transaction. i want
> to know how to set auto commit off
> because if any error occours i want the whole transaction to be rolled back.
> when i tried alter database dbname set autocommit = off
> then it gives me error saying autocommit not available
> so can anyone suggest how to set autocommit as off so that i can rollback
> the transaction..
Simply issue the command "BEGIN" at the start of your transaction.
Then nothing will be commited until you issue "COMMIT" and you may abort
the transaction by sending "ROLLBACK" (or "ABORT").
HTH,
Tino.
--
"What we nourish flourishes." - "Was wir nähren erblüht."
www.craniosacralzentrum.de
www.forteego.de
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: postgresql@tisc.de
Subject: Re: Query
In-Reply-To: <20080719132704.GF22515@easy2.in-chemnitz.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox