create function f_thetable_biud() returns trigger as $body$ --declare vars begin -- new, old -- tg_op = INSERT,DELETE,UPDATE return new/old; end; $body$ language plpgsql; create trigger t_thetable_biud before/after insert or update or delete on thetable for each row execute procedure f_thetable_biud();
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter