Re: Writeable CTEs patch
От | Marko Tiikkaja |
---|---|
Тема | Re: Writeable CTEs patch |
Дата | |
Msg-id | 4B72C5C8.4090204@cs.helsinki.fi обсуждение исходный текст |
Ответ на | Re: Writeable CTEs patch (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On 2010-02-08 18:42 +0200, Robert Haas wrote: > On Thu, Feb 4, 2010 at 11:57 AM, Marko Tiikkaja > <marko.tiikkaja@cs.helsinki.fi> wrote: >> On 2010-02-04 18:04 UTC+2, I wrote: >>> While working on the docs, I noticed one problem with the patch itself: >>> it doesn't handle multi-statement DO INSTEAD rules correctly. I'm going >>> to submit a fix for that later. >> >> Here's an updated patch. Only changes from the previous patch are >> fixing the above issue and a regression test for it. > > - It appears that we pull out all of the DML statements first and run > them in order, but I'm not sure that's the right thing to do. > Consider: > > WITH x AS (INSERT ...), y AS (SELECT ...), z AS (INSERT ...) SELECT ... > > I would assume we would do x, CCI, do y, do z, CCI, do main query, but > I don't think that's what this implements. The user might be > surprised to find out that y sees the effects of z. I've updated the patch according to what I said here: http://archives.postgresql.org/pgsql-hackers/2010-02/msg00722.php I haven't done any extensive testing, but it seems to work in the most common cases. Regards, Marko Tiikkaja
Вложения
В списке pgsql-hackers по дате отправления: