Transactions help more, IMO. The 1=1 becomes a real habit.
towerful@programming.dev 1 year ago
PG has a useful extension, pg_safeupdate
github.com/eradman/pg-safeupdate
It helps reduce these possibilities by requiring a where clause for updates or deletes.
I guess if you get into a habit of adding where 1=1
to the end of your SQL, it kind of defeats the purpose.
fmstrat@lemmy.nowsci.com 1 year ago
myersguy@lemmy.simpl.website 1 year ago
MySQL (and by extension, MariaDB) has an even better option:
mysql --i-am-a-dummy
tau@lemmings.world 1 year ago
Amazing! These are going in my.conf ASAP.