Re: Using results from INSERT ... RETURNING
От | Robert Haas |
---|---|
Тема | Re: Using results from INSERT ... RETURNING |
Дата | |
Msg-id | 7690046D-9A49-4189-A33C-14F8E5D2BD8E@gmail.com обсуждение исходный текст |
Ответ на | Re: Using results from INSERT ... RETURNING (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Oct 4, 2009, at 11:47 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Robert Haas <robertmhaas@gmail.com> writes: >> Well, I think a patch to implement writeable CTEs is probably going >> to >> have to handle this case - I don't think we can just ignore rewrite >> rules when processing a CTE. But it does seem to be beyond the scope >> of the current patch. > > I hadn't been paying too much attention to this thread, but ... why > is anyone worrying about that? Rewrite rules are not the concern > of either the planner or the executor. A "do also" rule will result > in two entirely separate Query trees, which will each be planned > separately and executed separately. Any given executor run only > has to think about one type of DML command --- otherwise the executor > would be broken already, since it takes only one command-type > argument. If an INSERT/UPDATE/DELETE appears within a CTE, it will still need to be rewritten. But you're right that this is irrelevant to the present patch; I just didn't see that at once. ...Robert
В списке pgsql-hackers по дате отправления: