Re:“balls”: The day I locked everyone out of the company int...
by justinclift on Saturday July 15, 2023 @07:05AM
(#36735481)
At a previous place I worked, if they were working on the cli (eg in psql or similar), they'd always use these two steps, either of which would do the job:
1. Start a transaction before even thinking of writing the delete/update/etc (BEGIN; ...)
2. Always write the WHERE query out first, THEN go back to the start of the line and fill out the DELETE/UPDATE/etc.
It worked well, and it's a habit I've since tried to keep on doing myself as well.
1. Start a transaction before even thinking of writing the delete/update/etc (BEGIN; ...)
2. Always write the WHERE query out first, THEN go back to the start of the line and fill out the DELETE/UPDATE/etc.
It worked well, and it's a habit I've since tried to keep on doing myself as well.