On 2022-Aug-01, Amit Langote wrote:
> On Sat, Jul 30, 2022 at 5:25 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > I do not think it's a great idea to have ALTER TABLE scribbling on
> > the source parsetree.
>
> Hmm, I think we already do scribble on the source parse tree even
> before this patch, for example, as ATPrepCmd() does for DROP
> CONSTRAINT:
>
> if (recurse)
> cmd->subtype = AT_DropConstraintRecurse;
No, actually nothing scribbles on the parsetree, because ATPrepCmd is
working on a copy of the node, so there's no harm done to the original.
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"I can't go to a restaurant and order food because I keep looking at the
fonts on the menu. Five minutes later I realize that it's also talking
about food" (Donald Knuth)