On 9/7/22 4:02 AM, Alvaro Herrera wrote:
> Hi Jonathan,
>
> On 2022-Sep-06, Jonathan S. Katz wrote:
>
>> * [`MERGE`](https://www.postgresql.org/docs/15/sql-merge.html) statements are
>> explicitly rejected inside of a
>> [common-table expression](https://www.postgresql.org/docs/15/queries-with.html)
>> (aka `WITH` query) and
>> [`COPY`](https://www.postgresql.org/docs/15/sql-copy.html) statements.
>
> I would say "Avoid crash in MERGE when called inside COPY or a CTE by
> throwing an error early", so that it doesn't look like we're removing a
> feature.
Yeah, we don't want to create the wrong impression. I updated it per
your suggestion (with minor tweaks) and removed the line that David
mentioned around the test fix.
Thanks!
Jonathan