Re: Generate GUC tables from .dat file - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Generate GUC tables from .dat file
Date
Msg-id 3DB79845-5991-4E7B-8D92-892DF85CE2AB@yesql.se
Whole thread Raw
In response to Re: Generate GUC tables from .dat file  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Generate GUC tables from .dat file
List 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




pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: pgsql: Move SQL-callable code related to multixacts into its own file
Next
From: Yugo Nagata
Date:
Subject: Re: Inconsistent update in the MERGE command