I've already read the friendly manual but have not found any clue.
I would like to do some calculation on the rows of a table every time it
I've decided to use:
create table table1 (
create table table2 (
id integer unique not null,
create rule myrule
as on update
set overall=(select count(*) from table1 where afield>0 and
where table2.id = NEW.id
What it seems to me is that the table "table1 t1" is being processed *before*
the update and not *after*. Infact the sum() returns the old value.
Is this the expected behaviour?
How can I have my rule action run *after* the actual update?
Thanks to anyone that can help me.
Maybe Computers will never be as intelligent as Humans.
For sure they won't ever become so stupid. [VR-1988]
pgsql-novice by date
|Next:||From: Michael Fuhr||Date: 2005-06-29 13:03:42|
|Subject: Re: Sstored Procedures|
|Previous:||From: Christoph Della Valle||Date: 2005-06-29 08:53:55|
|Subject: Re: posgres file|