Re: ROLLBACK problem - Mailing list pgsql-general

From Ron Peterson
Subject Re: ROLLBACK problem
Date
Msg-id 3947974A.15C27ED2@yellowbank.com
Whole thread Raw
In response to ROLLBACK problem  (Kshipra <kshipra@mahindrabt.com>)
List pgsql-general
Kshipra wrote:
>
> Hello,
> We are in the process of evaluating PostgreSQL ,
> we could not perform ROLLBACK function in pgsql  .
> It got aborted .
> Tell us how ROLLBACK is to be executed.
> thanks

CREATE TABLE test (
    aval text
);

INSERT INTO test
VALUES ( 'a' );

INSERT INTO test
VALUES ( 'b' );

INSERT INTO test
VALUES ( 'c' );

SELECT * FROM test;

 aval
------
 a
 b
 c

BEGIN;

INSERT INTO test
VALUES ( 'd' );

INSERT INTO test
VALUES ( 'e' );

ROLLBACK;

SELECT * FROM test;

 aval
------
 a
 b
 c


________________________
Ron Peterson
rpeterson@yellowbank.com

pgsql-general by date:

Previous
From: teixeira@conectiva.com.br
Date:
Subject: Re:
Next
From: Ron Peterson
Date:
Subject: Re: feature request