Re: How to rollback a sql

From: Jeff Davis <list-pgsql-general(at)dynworks(dot)com>
To: "Alex Cheung Tin Ka" <tkcheung(at)vtc(dot)edu(dot)hk>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to rollback a sql
Date: 2002-03-11 04:32:59
Message-ID: 200203110437.UAA29214@mail.ucsd.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I would like to know how to make the pgsql system not doing the auto
> commit and let me have time to do the roll back.

Just start by executing the query "BEGIN" and then it won't commit until you
execute the query "COMMIT".

ex:
=> BEGIN;
=> [ more queries here]
=> COMMIT;

or
=> BEGIN;
=> [more queries]
=> ROLLBACK;

Regards,
Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frank_Lupo Frank_Lupo 2002-03-11 08:22:44 big problem
Previous Message Alex Cheung Tin Ka 2002-03-11 04:17:44 How to rollback a sql