Re: Using results from INSERT ... RETURNING - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Using results from INSERT ... RETURNING
Date
Msg-id 15986.1255040674@sss.pgh.pa.us
Whole thread Raw
In response to Re: Using results from INSERT ... RETURNING  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
List pgsql-hackers
Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> writes:
> Tom Lane wrote:
>> Hm, I've not compared the two versions of the patch, but what I was
>> thinking was that I'd like to get the resultRelation stuff out of EState
>> and have it *only* in the DML nodes.  It sounds like you went in the
>> other direction --- what was the reason for that?

> I've taken a compromise of that in the writeable CTE code; the DML nodes
> have the index to the start of their result relation array which is part
> of estate->es_result_relations.  This way the code that currently
> depends on estate->es_result_relations works normally.

OK, that will work I guess, though you'll need to consider how to combine
result_relations arrays from multiple DML nodes.  A quick look shows me
that there are a couple of places that do want to look at all the result
relations.  We could possibly get rid of that but it's not clear it'd
be much less ugly than what you suggest here.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: COPY enhancements
Next
From: Andrew Dunstan
Date:
Subject: Re: COPY enhancements