Re: currval = currval+1

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: currval = currval+1
Дата
Msg-id BANLkTi=FRg-sWLzLnKJH2eR=vD8hk4L64w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: currval = currval+1  (salah jubeh <s_jubeh@yahoo.com>)
Список pgsql-general
On Wed, Jun 1, 2011 at 10:22 AM, salah jubeh <s_jubeh@yahoo.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

В списке pgsql-general по дате отправления:

Предыдущее
От: salah jubeh
Дата:
Сообщение: Re: currval = currval+1
Следующее
От: Tom Lane
Дата:
Сообщение: Re: currval = currval+1