Re: [BUGS] Problem with rule and null value

2004-10-24 Thread Harald Armin Massa
>ON UPDATE TO album WHERE new.pls_id != old.pls_id > It works until new.pls_id or old.pls_id is null. The rule is still called > (based on my test), but the "DO" query is not executed correctly. The > values in "album_edit" are not updated. To compare "NULL" to something is allways a bad ide

[BUGS] Problem with rule and null value

2004-10-23 Thread Marc Boucher
I'm using PostgreSQL 7.3.4. I've set up a series of rules and triggers to complete an intermediate table with similar informations from another table. This ensures better performance over a solution with views. Intermediate table: Table album_edit Field Type Length Not NullDe

Re: [BUGS] Problem with rule and null value

2004-10-22 Thread Tom Lane
Marc Boucher <[EMAIL PROTECTED]> writes: > CREATE OR REPLACE RULE albed_updalb3_rl AS >ON UPDATE TO album WHERE new.pls_id != old.pls_id > DO >UPDATE album_edit SET pls_id=new.pls_id WHERE alb_id=new.id; > It works until new.pls_id or old.pls_id is null. The rule is still called > (base

[BUGS] Problem with rule and null value

2004-10-22 Thread Marc Boucher
This is a resent. Wrong email account the first time. --- I'm using PostgreSQL 7.3.4. I've set up a series of rules and triggers to complete an intermediate table with similar informations from another table. This ensures better performance over a solution with views. Intermediate table: Tab