Re: BUG #17579: 15beta2: strange error when trying to use MERGE statement as a CTE
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: borz_off@cs.msu.su, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>,
Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2022-08-11T02:41:37Z
Lists: 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
Commits
-
Reject MERGE in CTEs and COPY
- 92af9143f13d 16.0 landed
- 455d254d2266 15.0 landed