Re: [GENERAL] conditional rule not applied

2010-01-08 Thread Seb
On Thu, 7 Jan 2010 21:04:45 -0700, Scott Marlowe wrote: > On Wed, Dec 30, 2009 at 6:39 PM, Seb wrote: >> CREATE RULE footwear_nothing_upd AS    ON UPDATE TO footwear DO >> INSTEAD NOTHING; CREATE RULE footwear_newshoelaces_upd AS    ON >> UPDATE TO footwear    WHERE NEW.sl_name <> OLD.sl_name AN

Re: [GENERAL] conditional rule not applied

2010-01-07 Thread Scott Marlowe
On Wed, Dec 30, 2009 at 6:39 PM, Seb wrote: > CREATE RULE footwear_nothing_upd AS >    ON UPDATE TO footwear DO INSTEAD NOTHING; > CREATE RULE footwear_newshoelaces_upd AS >    ON UPDATE TO footwear >    WHERE NEW.sl_name <> OLD.sl_name AND OLD.sl_name IS NULL >    DO > INSERT INTO shoelaces (sh_i

Re: [GENERAL] conditional rule not applied

2010-01-06 Thread Seb
On Wed, 06 Jan 2010 09:39:45 -0600, Seb wrote: > Would this express the intention any better? > CREATE RULE footwear_nothing_upd AS > ON UPDATE TO footwear DO INSTEAD NOTHING; > CREATE RULE footwear_newshoelaces_upd AS > ON UPDATE TO footwear > WHERE NOT EXISTS (SELECT sh_id FROM sho

Re: [GENERAL] conditional rule not applied

2010-01-06 Thread Seb
On Tue, 05 Jan 2010 20:20:13 -0600, Seb wrote: > On Wed, 30 Dec 2009 20:04:51 -0600, > Seb wrote: > On Wed, 30 Dec 2009 19:39:15 -0600, >> Seb wrote: > CREATE RULE footwear_nothing_upd AS >>> ON UPDATE TO footwear DO INSTEAD NOTHING; CREATE RULE >>> footwear_newshoelaces_upd AS ON UPDATE TO f

Re: [GENERAL] conditional rule not applied

2010-01-05 Thread Seb
On Wed, 30 Dec 2009 20:04:51 -0600, Seb wrote: > On Wed, 30 Dec 2009 19:39:15 -0600, > Seb wrote: > CREATE RULE footwear_nothing_upd AS >> ON UPDATE TO footwear DO INSTEAD NOTHING; CREATE RULE >> footwear_newshoelaces_upd AS ON UPDATE TO footwear WHERE NEW.sl_name >> <> OLD.sl_name AND OLD.sl_n

Re: [GENERAL] conditional rule not applied

2009-12-30 Thread Seb
On Wed, 30 Dec 2009 19:39:15 -0600, Seb wrote: > CREATE RULE footwear_nothing_upd AS > ON UPDATE TO footwear DO INSTEAD NOTHING; > CREATE RULE footwear_newshoelaces_upd AS > ON UPDATE TO footwear > WHERE NEW.sl_name <> OLD.sl_name AND OLD.sl_name IS NULL > DO > INSERT INTO shoelac

[GENERAL] conditional rule not applied

2009-12-30 Thread Seb
Hi, I'm trying to create a rule to be applied on update to a view that consists of two joined tables. Table 'shoes' below is left-joined with table 'shoelaces' in the view 'footwear'. I'd like to create a simple update rule on the view, only if the value of a common column corresponds to an inex