Re: insert/update/delete returning and rules - Mailing list pgsql-hackers

From Jonah H. Harris
Subject Re: insert/update/delete returning and rules
Date
Msg-id 36e682920608151632k1a90b31amf3c8dc539759b2f5@mail.gmail.com
Whole thread Raw
In response to Re: insert/update/delete returning and rules  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 8/15/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> But even this seems like it would fail in complicated cases.  What if
> the view is a join, and your ON INSERT rule inserts into two different
> underlying tables in two commands?  If you need fields from both tables
> to generate a full RETURNING list then there's no apparent way to make
> it work.

As both methods have the same issue when dealing with complicated
(multi-table) inserts, updates, or deletes... I'm pondering how to
best combine the tuples in such a way as to generate a full RETURNING
list.

Maybe it's the flu talking, but is there some way to hack the
RETURNINGs into a subselect-like form such that we could combine the
multiple values returned from say 2 insert statements into a complete
RETURNING list in a single tuple?


-- 
Jonah H. Harris, Software Architect | phone: 732.331.1300
EnterpriseDB Corporation            | fax: 732.331.1301
33 Wood Ave S, 2nd Floor            | jharris@enterprisedb.com
Iselin, New Jersey 08830            | http://www.enterprisedb.com/


pgsql-hackers by date:

Previous
From: "Larry Rosenman"
Date:
Subject: Re: BugTracker (Was: Re: 8.2 features status)
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Custom variable class segmentation fault