pgsql: Remove test_oat_hooks.c's nodetag_to_string().

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Remove test_oat_hooks.c's nodetag_to_string().
Дата
Msg-id E1oIG1u-0028Bd-SD@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3451a57f77848d69ced234b7989cc0e351383cd2

Modified Files
--------------
.../test_oat_hooks/expected/test_oat_hooks.out     |  168 +--
src/test/modules/test_oat_hooks/test_oat_hooks.c   | 1319 +-------------------
2 files changed, 85 insertions(+), 1402 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Add --schema and --exclude-schema options to vacuumdb.
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add more TAP tests with BASE_BACKUP and pg_backup_start/stop