Re: Generate pg_stat_get_* functions with Macros

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-12-06T08:01:22Z
Lists: pgsql-hackers
On Tue, Dec 06, 2022 at 12:23:55PM +0530, Bharath Rupireddy wrote:
> Likewise, is there a plan to add function generation macros for
> pg_stat_get_bgwriter, pg_stat_get_xact and so on?

Yes, I saw that and we could do it, but I did not get as much
enthusiastic in terms of code reduction.
--
Michael

Commits

  1. Fix macro definitions in pgstatfuncs.c

  2. Generate pg_stat_get*() functions for databases using macros