r/ProgrammerHumor • • Oct 14 '25

Advanced neverForget

/img/fmfo1e41g0vf1.png
14k Upvotes

615 comments sorted by

View all comments

Show parent comment

8

u/markuspeloquin Oct 14 '25

Transactions will lock some rows until you commit. That's a non-starter if you're typing commands into a production database. Be smart and don't use transactions. /s but also kinda not

I guess the right answer is to put it in a text file; start a transaction, do the thing, and abort. Make sure it looks right. Then switch the abort to commit and rerun it. Maybe.

18

u/Kellei2983 Oct 14 '25

the right answer is to let a colleague ruin his day instead