Tag Info

New answers tagged

0

You can use stored procedures and functions for instance. Tracking who-saw-what can be done through specially developed stored procedures and functions. In order to use this auditing method, access to the database must be limited through use of stored procedures (allowing EXEC statements only, while prohibiting all queries and DML operations). The result ...


2

Single trigger function for multiple triggers: possible - that's what you do. Single trigger for multiple tables: not possible. But you can shorten the code for creating lots of triggers: DO $$ BEGIN EXECUTE ( SELECT string_agg('CREATE TRIGGER touch_users BEFORE UPDATE ON ' || quote_ident(t) || ' FOR EACH ROW WHEN (OLD.modification_time IS NOT ...



Top 50 recent answers are included