3 ms·
(worst) update table set column = 'blah' WITHOUT a where clause (thank god for backups) (2nd worst) delete from table where created < 'old_date' WITHOUT an a
by cpt1138 13y ago
(worst) update table set column = 'blah'
WITHOUT a where clause (thank god for backups)
(2nd worst) delete from table where created < 'old_date'
WITHOUT an account (thank god again for backups)
Lesson learned, always backup and write the WHERE clause first
- mst 13y agoIt is possible to tell psql to always issue an implicit BEGIN so you also have to COMMIT before your change becomes permanent. This has saved me from paying the price for that particular class of mistake on a number of occasions.