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

From Marko Tiikkaja
Subject Re: Using results from INSERT ... RETURNING
Date
Msg-id 4ACE61F8.1070207@cs.helsinki.fi
Whole thread Raw
In response to Re: Using results from INSERT ... RETURNING  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Using results from INSERT ... RETURNING  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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.  Also, we set
estate->es_result_relation_info only during ExecInitDml().  I didn't
want to break that either.  The "index to es_result_relations" is a bit
kludgy, but I didn't see any better ways to do this and wanted to move
on with the code and not be stuck in a single place for too long.  But
I'm thinking that this should be part of the writeable CTE patch.


Regards,
Marko Tiikkaja



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Using results from INSERT ... RETURNING
Next
From: Bruce Momjian
Date:
Subject: Re: COPY enhancements