News for hackers. Stuff that matters.
Re:Soft Deletion Probably Isn't Worth It by fhub on Tuesday January 09, 2024 @01:25PM (#38929844)
> And forgetting that extra predicate on deleted_at can have dangerous consequences as it accidentally returns data that’s no longer meant to be seen.

For postgres you could consider using a view instead. See https://evilmartians.com/chronicles/soft-deletion-with-postg...

Re:Soft Deletion Probably Isn't Worth It by mike256 on Tuesday January 09, 2024 @02:24PM (#38930642)
You can do the same in other dbms. Just use an instead of delete trigger instead of the rule.
Re:Soft Deletion Probably Isn't Worth It by icedchai on Wednesday January 10, 2024 @12:18PM (#38940829)
This sort of logic is a good candidate for views. Of course, someone could choose not to use the view, but you can solve it with DB permissions, etc.