![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I gave an update command in a database and forgot to write the where-condition. Rollback? "WARNING: ROLLBACK: no transaction in progress ROLLBACK" |
|
Rollback is a basic operation from prehistoric age, that really was a nasty surprise. |
BNAME
#3
| |||
| |||
|
|
begin Laura I Kataja <likataja (AT) cc (DOT) helsinki.fi> wrote: I gave an update command in a database and forgot to write the where-condition. Rollback? "WARNING: ROLLBACK: no transaction in progress ROLLBACK" You forgot two things: not only the WHERE condition, unfortunately the BEGIN-Statement also. Rollback is a basic operation from prehistoric age, that really was a nasty surprise. ROLLBACK works only if you start a TRANSACTION before. You can enforce this (in psql) with \set AUTOCOMMIT off, i have this in my ~/.psqlrc: \set HISTFILE ~/.psql_history- BNAME\set PROMPT1 '%/%R%x%# ' \set AUTOCOMMIT off \set ON_ERROR_ROLLBACK on I'm afraid, but i think, you have no chance to get back your data... |
#4
| |||
| |||
|
|
I gave an update command in a database and forgot to write the where-condition. Rollback? "WARNING: ROLLBACK: no transaction in progress ROLLBACK" I was thinking that there might be some other way to get back - the commands are logged, but is there really no log for committed transactions (e.g. possibility to return to a point of time?) |
![]() |
| Thread Tools | |
| Display Modes | |
| |