From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pg_amcheck: Use CppAsString2() for relkind and relpersistence in
Date: Tue, 26 Nov 2024 00:45:51 +0000
Message-ID: <E1tFjiB-003XO7-DU@gemulon.postgresql.org> (raw)
pg_amcheck: Use CppAsString2() for relkind and relpersistence in queries
This utility has been using hardcoded values for relkind and
relpersistence in its queries generated. These queries are switched to
use CppAsString2() instead, with the values fetched directly from the
header of pg_class. This has the advantage of making the code more
self-documented, as it becomes unnecessary to look at a header for the
meaning of a value.
There should be no functional changes; the queries are generated the
same way as before this commit.
Reviewed-by: Nathan Bossart, Daniel Gustafsson, Álvaro Herrera, Karina
Litskevich
Discussion: https://postgr.es/m/ZxIvemDk0Ob1RGwh@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/91f5a4a000ea4979e5490e0a111c24f4486d7361
Modified Files
--------------
src/bin/pg_amcheck/pg_amcheck.c | 42 ++++++++++++++++++++++++++++-------------
1 file changed, 29 insertions(+), 13 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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pg_amcheck: Use CppAsString2() for relkind and relpersistence in
In-Reply-To: <E1tFjiB-003XO7-DU@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