Use more CppAsString2() in pg_amcheck.c

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-18T09:50:50Z
Lists: pgsql-hackers

Attachments

Hi all,

pg_amcheck.c is one of these places where relkind and relpersistence
values are hardcoded in queries based on the contents of pg_class_d.h.
Similarly to other places in src/bin/, let's sprinkle some
CppAsString2() and feed to the binary the values from the header.  The
patch attached does that.

Thoughts or comments?
--
Michael

Commits

  1. pg_amcheck: Use CppAsString2() for relkind and relpersistence in queries