I just made a mistake that could be quite costly: I did this:

update writer_survey set partid='W41308' where survid in (select survid
from participants where partid='W41291' limit 1);

when I should have done this:

update writer_survey set partid='W41308' where survid in (select survid
from writer_survey where partid='W41291' limit 1);


Ouch. First off, Postgres has transactioning. If you use BEGIN ... [ROLLBACK|COMMIT] you can avoid things like that. (the Perl DBI driver will allow you to do this, check the perldoc page for DBI). As a last resort, you can probably restore from the dump of the table/database you make nightly (riiiight?).

Alex


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to