From: Tony Simbine <jantos-work@mvweb.de>
To: pgsql-sql@postgresql.org
Subject: help: triggers
Date: Wed, 29 Jan 2003 14:29:27 +0100
Message-ID: <3E37D737.90902@mvweb.de> (raw)
hello,
I'm trying to update a columm on a table with a trigger
but it don't work on PostgreSQL 7.2 (i686-pc-linux-gnu, compiled by GCC
2.96).
when I update a row the trigger does nothing.
what can I do?
thanks in advance
tony
here is my trigger:
########################################################
CREATE FUNCTION update_my_objekt() RETURNS OPAQUE AS '
BEGIN
RAISE NOTICE ''My Trigger is updating the table'';
IF OLD.status=''Activo'' THEN
NEW.tempo := 10;
NEW.actual := now();
END IF;
RETURN NEW;
END;
' LANGUAGE 'plpgsql';
CREATE TRIGGER update_online BEFORE UPDATE ON iobjects
FOR EACH ROW EXECUTE PROCEDURE update_my_objekt();
##########################################################
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: jantos-work@mvweb.de
Subject: Re: help: triggers
In-Reply-To: <3E37D737.90902@mvweb.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox