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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE
Дата
Msg-id 20220811114020.li7sp32bxqsnlx7n@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE  (Richard Guo <guofenglinux@gmail.com>)
Ответы Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2022-Aug-11, Richard Guo wrote:

> 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.

I would like to have MERGE within CTEs, but I think for it to be truly
useful we need a RETURNING clause, which is currently not implemented.
I don't think it's terribly difficult to implement ... AFAICS most of
the pieces are there ... but clearly out of scope for pg15.

> +1 to disallow it for now.

This patch does that.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/

Вложения

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

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17581: DB Restriction Option Is Not Working
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE