Search Postgresql Archives
Trigger function to audit any kind of table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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, current_timestampmp, current_user, OLD, NEW;
RETURN NEW;
END $table_audit$ LANGUAGE plpgsql;
Can I create a table with those two RECORD pseudo-types or something compatible?
I'm using pgsql 8.1
Thanks.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Books]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]