Re: How to rollback a sql - Mailing list pgsql-general

From Jeff Davis
Subject Re: How to rollback a sql
Date
Msg-id 200203110437.UAA29214@mail.ucsd.edu
Whole thread Raw
In response to How to rollback a sql  ("Alex Cheung Tin Ka" <tkcheung@vtc.edu.hk>)
List 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

pgsql-general by date:

Previous
From: "Alex Cheung Tin Ka"
Date:
Subject: How to rollback a sql
Next
From: Frank_Lupo Frank_Lupo
Date:
Subject: big problem