Re: Using results from INSERT ... RETURNING

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using results from INSERT ... RETURNING
Дата
Msg-id 15986.1255040674@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using results from INSERT ... RETURNING  (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: COPY enhancements
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: COPY enhancements