Table rule does not work!

Поиск
Список
Период
Сортировка
От omid omoomi
Тема Table rule does not work!
Дата
Msg-id F2782UAaTzvb5YI9IJs00002185@hotmail.com
обсуждение исходный текст
Ответы Re: Table rule does not work!
Список pgsql-general
Hello all,
Here are two master/detail tables .
Table tk ( k1,k2,k3,k4,k5 ) and table tu (u1,u2,u3) where tk.k5 references
tu.u3  .
Now ,I've wrote a rule on table tk as below:
create rule tk_rule1 as on insert to tk do
update tu
set u1 = u1 + (new.k2 - new.k1) ,
    u2 = u2 + (new.k3 + new.k4 )
where tu.u3 = new.k5 ;

when I insert into table tk ,I expect to have table tu updated... but it is
not! although  there is no error message with it, the table tu remains
unchanged.

Any idea about what is wrong?
Is there any mistake with that rule or the 'new' variables?

TIA
Omid Omoomi



_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

Предыдущее
От: "Martin A. Marques"
Дата:
Сообщение: pg_hba.conf file
Следующее
От: "Dan Harrington"
Дата:
Сообщение: Error message on pg_dumpall