Re: Query

From: Tino Schwarze <postgresql(at)tisc(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Query
Date: 2008-07-19 13:27:04
Message-ID: 20080719132704.GF22515@easy2.in-chemnitz.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

In response to

  • Query at 2008-07-19 10:59:00 from Kartik

Browse pgsql-admin by date

  From Date Subject
Next Message paul socha 2008-07-19 15:37:24 Re: Database Link
Previous Message Kartik 2008-07-19 10:59:00 Query