Re: Removing another gen_node_support.pl special case

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-11-29T21:34:30Z
Lists: pgsql-hackers

Attachments

I wrote:
> I notice that EquivalenceClass is already marked as no_copy_equal,
> which means that gen_node_support.pl can know that emitting a
> recursive node-copy or node-compare request is a bad idea.  What
> do you think of using the patch as it stands, plus a cross-check
> that we don't emit COPY_NODE_FIELD or COMPARE_NODE_FIELD if the
> target node type is no_copy or no_equal?

Concretely, it seems like something like the attached could be
useful, independently of the other change.

			regards, tom lane

Commits

  1. Remove gen_node_support.pl's special treatment of EquivalenceClasses.

  2. Add some error cross-checks to gen_node_support.pl.