Search Postgresql Archives

rule creating infinite recursion not sure why

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was trying to create a rule to set a column to false whenever another column was changed:

CREATE RULE...
ON UPDATE TO criterion
   WHERE new.pattern::text <> old.pattern::text DO UPDATE table SET flag = false
  WHERE id = old.id

pattern | id
12345  | 1

=> update criterion set pattern = '12345' where id = 1;
ERROR:  infinite recursion detected in rules for relation "criterion"

I'm not sure why it's detecting recursion in this case when the rule conditional should be false

Thanks for any help...
gene

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux