From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | salah jubeh <s_jubeh(at)yahoo(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: currval = currval+1 |
Date: | 2011-06-01 15:43:42 |
Message-ID: | BANLkTi=FRg-sWLzLnKJH2eR=vD8hk4L64w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jun 1, 2011 at 10:22 AM, salah jubeh <s_jubeh(at)yahoo(dot)com> wrote:
> I have some rules on the table and I have dropped them and everything went
> fine. the rule is as follow
>
> CREATE OR REPLACE RULE status_change_ins AS
> ON INSERT TO account DO INSERT INTO account_status_change_log
> (account_id, account_status_id, status_change_date)
> VALUES (new.account_id, new.account_status_id, now());
>
> I do not know what is happing here, but this is a strange behavior.
'rules suck' is the problem :(. uncontrollable re-execution of
volatile functions is just *one* issue with them. good news: 9.1
completely fixes this with view update triggers. In the meantime,
consider dropping the update rule and making a functions which does
the delete and updates the log, or doing it in the client.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-06-01 15:52:41 | Re: currval = currval+1 |
Previous Message | salah jubeh | 2011-06-01 15:22:31 | Re: currval = currval+1 |