Re:Easy, alternative soft deletion: `deleted_record_insert`
by doctor_eval on Sunday January 01, 2023 @04:45AM
(#34205030)
I have experimented with mapping application users 1:1 to individual database users, and using SET ROLE at the start of every transaction.
I got it working in a PoC, and with the right configuration of roles, this pattern would give you user identity and audit right down to the database itself.
Sadly I haven’t pulled it off in production environment yet, but if I ever get the chance to work at this level in an enterprise app again, I’ll definitely do it.
I got it working in a PoC, and with the right configuration of roles, this pattern would give you user identity and audit right down to the database itself.
Sadly I haven’t pulled it off in production environment yet, but if I ever get the chance to work at this level in an enterprise app again, I’ll definitely do it.