15 karma · joined Jan 1, 2023 (3y ago) · 4 submissions
comment 3y ago · link · parent
To give an example for your 1st point: If you have the schema users->messages->message_attachments and message_attachments does not store the user_id, you'll have trouble finding all attachments from a specific user.
-- Permanently delete message sent by jon
DELETE from deleted_record where table_name = 'messages' and data->>'sender' = 'jon';
[1] https://www.postgresql.org/docs/15/functions-json.html