Re: Violation of principle that plan trees are read-only

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2025-05-20T21:04:56Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. In ExecInitModifyTable, don't scribble on the source plan.

  2. Rely on executor utils to build targetlist for DML RETURNING.

I wrote:
> [ confused... ]  I get the same output from that script with or
> without the patch.

Oh, scratch that: I'd gotten confused about which branch I was
working in.  It does change the output as you say.

I still think it's irrelevant to view display, including pg_dump,
though.  Those operations work from a parse tree not a plan tree.

			regards, tom lane