Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE
Дата
Msg-id CAMbWs4-Zdeq+0c3npMGihZbGztR8WvWMs7XuSqKp8OLeg3HHOA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-bugs

On Mon, Aug 8, 2022 at 10:21 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
It evidently wasn't ever *tested*, but in principle I think it ought
to work.  I'm not sure how much effort will be involved to make that
happen.  At this point we might have to disallow it for v15 and
come back to the problem later.

Seems we neglect to think of MERGE statements when we transform WITH
clauses and when we rewrite the query. If we add the check against MERGE
statement in parse_cte.c and in rewriteHandler.c, the query in problem
can work. But I'm not sure if that's enough.

+1 to disallow it for now.

Thanks
Richard 

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alexander Pyhalov
Дата:
Сообщение: Re: foreign join error "variable not found in subplan target list"
Следующее
От: David Turoň
Дата:
Сообщение: Re: BUG #17206: the function array_cat(anyarray, anyarray) does not exist