Re: top-level DML under CTEs
От | Marko Tiikkaja |
---|---|
Тема | Re: top-level DML under CTEs |
Дата | |
Msg-id | 4C8F99C7.5020103@cs.helsinki.fi обсуждение исходный текст |
Ответ на | top-level DML under CTEs (Hitoshi Harada <umi.tanuki@gmail.com>) |
Ответы |
Re: top-level DML under CTEs
|
Список | pgsql-hackers |
On 2010-09-13 4:15 PM +0300, Hitoshi Harada wrote: > 1. WITH clause atop INSERT > Although the previous discussion got the consensus that we forbid WITH > atop INSERT, it seems to me that it can be allowed. I managed to do it > by treating the top WITH clause (of INSERT) as if the one of SELECT > (or VALUES). In the email you referred to, Tom was concerned about the case where these WITH lists have different RECURSIVE declarations. This patch makes both RECURSIVE if either of them is. I can think of cases where that might lead to surprising behaviour, but the chances of any of those happening in real life seem pretty slim. > It is possible to disallow the CTE over INSERT statement, > but the lack for INSERT, though there are for UPDATE and DELETE, > sounds inconsistent enough. Also because wCTEs are not allowed below the top level, not being able to use INSERT as the top level statement would force people to wrap that INSERT in another CTE. Regards, Marko Tiikkaja
В списке pgsql-hackers по дате отправления: