[GENERAL] comparing OLD and NEW in update trigger..

2006-01-26 Thread Alex Mayrhofer
Hi there, i'm using the following trigger function to update a timestamp of a row when it is UPDATEd: CREATE OR REPLACE modified_trigger() RETURNS opaque AS $$ BEGIN NEW.modify_timestamp := now(); END; $$ LANGUAGE SQL; Since i like to use the same trigger for various tables, i'm plan

Re: [GENERAL] comparing OLD and NEW in update trigger..

2006-01-26 Thread Richard Huxton
Alex Mayrhofer wrote: Hi there, i'm planning to use the following trigger function to update a timestamp of a row when it is UPDATEd: CREATE OR REPLACE modified_trigger() RETURNS opaque AS $$ BEGIN NEW.modify_timestamp := now(); END; $$ LANGUAGE SQL; I don't think you can write a t

[GENERAL] comparing OLD and NEW in update trigger..

2006-01-26 Thread Alex Mayrhofer
Hi there, i'm planning to use the following trigger function to update a timestamp of a row when it is UPDATEd: CREATE OR REPLACE modified_trigger() RETURNS opaque AS $$ BEGIN NEW.modify_timestamp := now(); END; $$ LANGUAGE SQL; Since i like to use the same trigger procedure for vari