Skip site navigation (1) Skip section navigation (2)

Re: Multiple row update with trigger

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Multiple row update with trigger
Date: 2007-05-21 19:05:51
Message-ID: 20070521190550.GA23573@KanotixBox (view raw or flat)
Thread:
Lists: pgsql-novice
Derrick Betts <list(at)blueaxis(dot)com> schrieb:
> Does anyone have any good ideas as to how I might solve this problem? 
> Perhaps even taking a completely different approach in some way?

Maybe with a RULE instead a TRIGGER. A Rule, with DO INSTEAD. For
example, a RULE like 

create or replace rule my_rule as on update to my_table do instead update
my_table ... 


I'm not sure, try it.
http://www.postgresql.org/docs/current/interactive/rules-update.html


Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

In response to

pgsql-novice by date

Next:From: Jon SimeDate: 2007-05-21 19:23:58
Subject: Re: Multiple row update with trigger
Previous:From: Derrick BettsDate: 2007-05-21 18:53:36
Subject: Multiple row update with trigger

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group