Trigger problem

From: "kasper" <no(at)spam(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Trigger problem
Date: 2004-06-08 19:38:37
Message-ID: BJnxc.1978$_s7.121@news.get2net.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi guys

Im tryint to make a trigger that marks a tuble as changed whenever someone
has updated it

my table looks something like this

create table myTable (
...
changed boolean;
)

now ive been working on a trigger and a sp that looks like this, but it
doesnt work...

create function myFunction returns trigger as '
begin
new.changed = true;
return new;
end;
' language 'plpgsql';

create trigger myTrigger
after update on lektioner
for each row
execute procedure myFunction();

the code compiles, runs, and doesnt whine about anything, but nothing
changes...

any ideas??

- Kasper

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michelle Murrain 2004-06-08 21:51:22 simple addition of constraints problem
Previous Message Mike Rylander 2004-06-08 18:57:44 Re: Trigger problem