Postgresql: Trigger template

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();
Simple template for creating postgresql triggers.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.