Re: updateable/insertable view having left joined tables - Mailing list pgsql-sql

From Seb
Subject Re: updateable/insertable view having left joined tables
Date
Msg-id 87iqj1t22k.fsf@kolob.sebmags.homelinux.org
Whole thread Raw
In response to updateable/insertable view having left joined tables  (Seb <spluque@gmail.com>)
List pgsql-sql
The following seems to work, but I don't feel confident this is really
the correct code:

CREATE RULE shoe_upd AS   ON UPDATE TO shoe   DO INSTEAD (   UPDATE shoes   SET sh_name = NEW.sh_name, sh_avail =
NEW.sh_avail  WHERE shoes.sh_id = NEW.sh_id;   INSERT INTO shoelaces (sh_id, sl_name)   SELECT New.sh_id, New.sl_name
WHERENew.sl_name IS NOT NULL;);
 

I could find out doing a number of tests, but it would be good to
understand what is going on.

-- 
Seb



pgsql-sql by date:

Previous
From: Greg Stark
Date:
Subject: Re: Taking the cache out of the equation?
Next
From: Mark Fenbers
Date:
Subject: drop PW