Re: Generate GUC tables from .dat file
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: John Naylor <johncnaylorls@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-08-28T13:29:41Z
Lists: pgsql-hackers
> On 28 Aug 2025, at 08:53, Peter Eisentraut <peter@eisentraut.org> wrote:
> I addressed all those, and did another cleanup pass over the script. (The formatting is from pgperltidy.)
A tiny nitpick is that all the other generator scripts (that I looked at) in
the tree use GetOptions() with named parameter rather than dereference ARGV
directly:
+my $input_fname = $ARGV[0];
+my $output_fname = $ARGV[1];
Also, I would have directed the reader to guc_parameters.dat in the below
comment since that's the canonical copy of the default value, but it's a
personal preference as it can just as easily be argued for keeping guc_tables.c
/*
* We may not yet know where PGSHAREDIR is (in particular this is true in
* an EXEC_BACKEND subprocess). So use "GMT", which pg_tzset forces to be
* interpreted without reference to the filesystem. This corresponds to
* the bootstrap default for these variables in guc_tables.c, although in
* principle it could be different.
*/
Apart from those small remarks, +1 on this patch. For future work, once this
has landed, it could be neat to add formatting checks to ensure long/short_desc
end with proper punctuation etc.
--
Daniel Gustafsson
Commits
-
Ensure guc_tables.o's dependency on guc_tables.inc.c is known.
- aadbcc40bc24 19 (unreleased) landed
-
Clean up newly added guc_tables.inc.c
- f0478149c34d 19 (unreleased) landed
-
Generate GUC tables from .dat file
- 63599896545c 19 (unreleased) landed
-
Formatting cleanup of guc_tables.c
- 878656dbde0d 19 (unreleased) landed