Re: Use more CppAsString2() in pg_amcheck.c

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-18T09:59:48Z
Lists: pgsql-hackers
> On 18 Oct 2024, at 11:50, Michael Paquier <michael@paquier.xyz> wrote:

> 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.

I haven't studied the patch in detail (yet), nothing stood out from a quick
skim, but +1 on the concept.

--
Daniel Gustafsson




Commits

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