Re:
От | Oliver Elphick |
---|---|
Тема | Re: |
Дата | |
Msg-id | 200110162226.f9GMPpPo030971@linda.lfix.co.uk обсуждение исходный текст |
Ответ на | ("Mona" <mlisa@bisil.com>) |
Список | 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.Elphick@lfix.co.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
В списке pgsql-general по дате отправления: