https://github.com/supabase/supa_audit
it 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