(no title)
crescentfresh | 4 years ago
with affected_rows as (
insert/update/delete into/from ...
returning *
)
insert into my_audit_table
select @op, current_timestamp, @userinfo, * from affected_rows
where @op is bound to one of "insert", "update" or "delete" and @userinfo is the user(name|id|various|etc) of the user that caused the change.
kmdupree|4 years ago
AaronFriel|4 years ago
mrcarruthers|4 years ago