Re: [GENERAL] Trigger function to audit any kind of table

2006-06-08 Thread Jim C. Nasby
On Tue, Jun 06, 2006 at 01:54:01PM -0500, Sergio Duran wrote: > Hello, > > I would like to know if it is possible to create a trigger function which > does something like > > CREATE OR REPLACE FUNCTION table_audit() RETURNS TRIGGER AS $table_audit$ > BEGIN > INSERT INTO audit SELECT TG_OP, curre

[GENERAL] Trigger function to audit any kind of table

2006-06-06 Thread Sergio Duran
Hello,I would like to know if it is possible to create a trigger function which does something likeCREATE OR REPLACE FUNCTION table_audit() RETURNS TRIGGER AS $table_audit$BEGIN  INSERT INTO audit SELECT TG_OP, current_timestampmp, current_user, OLD, NEW;   RETURN NEW;END $table_audit$ LANGUAGE plp