| От | Alex J. Avriette |
|---|---|
| Тема | Re: URGENT: undoing a mistake |
| Дата | |
| Msg-id | GamcnfQEzq8-1lygXTWcog@speakeasy.net обсуждение |
| Ответ на | URGENT: undoing a mistake (Andrew Perrin <clists@perrin.socsci.unc.edu>) |
| Список | pgsql-admin |
> 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
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера