From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove test_oat_hooks.c's nodetag_to_string().
Date: Sun, 31 Jul 2022 20:59:19 +0000
Message-ID: <E1oIG1u-0028Be-Sh@gemulon.postgresql.org> (raw)
Remove test_oat_hooks.c's nodetag_to_string().
In the short time this function has existed, it's already proven to be
a nontrivial maintenance burden, since it has to be updated whenever a
node tag is added or removed. Although in principle we could now
automate that, I see little justification for having such functionality
here at all. The function is only being applied to utility statements,
for which we already have infrastructure for obtaining string names.
Moreover, that infrastructure produces already-familiar-to-users names,
unlike nodetag_to_string().
So, remove this function and use the existing infrastructure instead.
That saves over a thousand lines of largely-unreachable code.
Back-patch to v15 where this code came in. Although it seems unlikely
that v15's nodetag list will change anymore, we might as well keep the
two branches looking and acting alike; otherwise back-patching any
test-results changes in this area will be painful.
Discussion: https://postgr.es/m/843818.1659218928@sss.pgh.pa.us
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/6e37312a2a595b7f75e1190b2d15e88d54b366a7
Modified Files
--------------
.../test_oat_hooks/expected/test_oat_hooks.out | 160 +--
src/test/modules/test_oat_hooks/test_oat_hooks.c | 1328 +-------------------
2 files changed, 81 insertions(+), 1407 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Remove test_oat_hooks.c's nodetag_to_string().
In-Reply-To: <E1oIG1u-0028Be-Sh@gemulon.postgresql.org>
References: <E1oIG1u-0028Be-Sh@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox