Re: Using results from INSERT ... RETURNING

From: Marko Tiikkaja <marko(dot)tiikkaja(at)cs(dot)helsinki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, PostgreSQL hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Using results from INSERT ... RETURNING
Date: 2009-10-08 22:04:40
Message-ID: 4ACE61F8.1070207@cs.helsinki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-10-08 22:23:03 Re: COPY enhancements
Previous Message Tom Lane 2009-10-08 21:59:05 Re: Using results from INSERT ... RETURNING