Re: help: triggers

From: "Wei Weng" <wweng(at)kencast(dot)com>
To: "Tony Simbine" <jantos-work(at)mvweb(dot)de>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: help: triggers
Date: 2003-01-29 15:55:42
Message-ID: 004501c2c7ae$e09ce210$5301a8c0@monet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

It would be better if you could provide the source of that trigger and involved
table schemas?

Wei

----- Original Message -----
From: "Tony Simbine" <jantos-work(at)mvweb(dot)de>
To: <pgsql-sql(at)postgresql(dot)org>
Sent: Wednesday, January 29, 2003 8:29 AM
Subject: [SQL] help: triggers

> 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();
>
> ##########################################################
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Neal Lindsay 2003-01-29 19:56:10 Inheritence and Integrity
Previous Message Jan Hidders 2003-01-29 13:48:56 Re: double linked list