<p>On Tuesday 22 November 2005 18:07, Achilleus Mantzios wrote:<p>>O Leif B. Kristensen ?????? ???? Nov 22, 2005
:<p>>>What am I missing?<p>><p>>apparently some forgotten process_last_edited() function.<p><p>Yes -- an
earlierattempt at the same thing ...<p><p>I finally managed to create my first trigger:<p><p>CREATE OR REPLACE FUNCTION
update_last_edit()RETURNS TRIGGER AS $$<p>BEGIN<p> UPDATE persons SET last_edit=NOW() WHERE person_id=NEW.person_fk;<p>
RETURNNEW;<p>END;<p>$$ LANGUAGE plpgsql;<p><p>CREATE TRIGGER update_last_edit <p>BEFORE INSERT OR UPDATE ON
participants<p>FOR EACH ROW EXECUTE PROCEDURE update_last_edit();<p><p>And it's even working as it should
:-)<p><p>Thanks,guys.<p>-- <p>Leif Biberg Kristensen | Registered Linux User #338009<p>http://solumslekt.org/ |
Cruisingwith Gentoo/KDE<p>