Re:

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: "Mona" <mlisa(at)bisil(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re:
Date: 2001-10-16 22:25:51
Message-ID: 200110162226.f9GMPpPo030971@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Mona" wrote:
>We are trying to rollback an update in postgres. But so far we have not bee=
>n able to do it.
>When we Rollback..
>it says:
>
>ROLLBACK: No transaction in progress.
>
>Same happens with commit.

Each INSERT, UPDATE, COPY or DELETE is its own transaction unless a
transaction is explicitly started with BEGIN.

junk=# insert into s (name) values ('some junk');
INSERT 27805072 1
junk=# rollback;
NOTICE: ROLLBACK: no transaction in progress
ROLLBACK
junk=# begin;
BEGIN
junk=# insert into s (name) values ('some more junk');
INSERT 27805073 1
junk=# rollback;
ROLLBACK
junk=# select * from s;
id | name
----+-----------
2 | some junk
(1 row)

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

"But be ye doers of the word, and not hearers only,
deceiving your own selves." James 1:22

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2001-10-16 22:27:49 Re: loggin
Previous Message Dave Cramer 2001-10-16 21:59:48 Re: