Comment Comment by kiwicopple this approach is also available as an extension here:https://github.com/supabase/supa_auditit uses a slightly more generic implementation so that you can easily turn on/off auditing. i.e. select audit.enable_tracking('public.account'::regclass); select audit.disable_tracking('public.account'::regclass); the reason for the 'public.account'::regclass is to store the tables OID, rather than the name - this is cheaper than text and allows you to rename the table without losing the history parent kiwicopple 2 years ago
https://github.com/supabase/supa_audit
it uses a slightly more generic implementation so that you can easily turn on/off auditing. i.e.
the reason for the 'public.account'::regclass is to store the tables OID, rather than the name - this is cheaper than text and allows you to rename the table without losing the history