]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Remove test_oat_hooks.c's nodetag_to_string().
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 31 Jul 2022 20:58:20 +0000 (16:58 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 31 Jul 2022 20:58:41 +0000 (16:58 -0400)
commit6e37312a2a595b7f75e1190b2d15e88d54b366a7
tree9e2acf906ae5d8ba6e7d1fb409ab9c9e6ab7f074
parent9c9fc20e6fdf34d480b55bd517487b0affbf18e0
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
src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
src/test/modules/test_oat_hooks/test_oat_hooks.c