Re: GSOC13 proposal - extend RETURNING syntax
От | Andres Freund |
---|---|
Тема | Re: GSOC13 proposal - extend RETURNING syntax |
Дата | |
Msg-id | 20131004134008.GP19661@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: GSOC13 proposal - extend RETURNING syntax (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On 2013-10-03 20:51:08 -0400, Robert Haas wrote: > On Thu, Oct 3, 2013 at 7:54 PM, Karol Trzcionka <karlikt@gmail.com> wrote: > > Compare EXPLAIN ANALYZE VERBOSE on your statement and on "patched" > > workflow. I can see significant difference. And your "after" returns the > > value after whole the work (after trigger fired) as I know (I don't know > > if it is needed or not, I only point at the difference). > > Sure, I'm not saying we should implement it that way. I'm just > pointing out that the ability already exists, at the executor level, > to return either tuple. So I think the executor itself shouldn't need > to be changed; it's just a matter of getting the correct plan tree to > pop out. Note what pullups ExecDelete is doing to return the old tuple though... So, based on precedent special executor support is not an unlikely thing to be required for a proper implemenation. As Marko mentions, any trivial implementation not doing playing dirty like that will refer to the wrong version of the tuple. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: