Re: Modification Dates - Mailing list pgsql-general

From Sven Schwyn
Subject Re: Modification Dates
Date
Msg-id 7B5823F7-F279-11D7-BD02-00039398CFBA@bluewin.ch
Whole thread Raw
In response to Re: Modification Dates  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
List pgsql-general
Hi again

Got it, quite obvious too. The trigger has to be called BEFORE the
UPDATE, not AFTER. (Hmmm, very obvious even.)

CREATE TRIGGER _modified BEFORE UPDATE ON any_table FOR EACH ROW
EXECUTE PROCEDURE
touch();

That does the trick!

Greets,  -sven


pgsql-general by date:

Previous
From: ejos@epca.com.ve
Date:
Subject: Edward
Next
From: Christopher Browne
Date:
Subject: Re: Rewriting pg_upgrade