Search Postgresql Archives

Re: conditional rule not applied

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

 



On Wed, Dec 30, 2009 at 6:39 PM, Seb <spluque@xxxxxxxxx> 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_id, sl_name)
>    VALUES(NEW.sh_id, NEW.sl_name);

Isn't that first rule gonna always fire and make the second one a NOOP?

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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