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

From John Naylor
Subject Re: Generate GUC tables from .dat file
Date
Msg-id CANWCAZaJXVzkZQFkQE-ztDq87TBMpmKEcFn9XknigZMUSxhm5g@mail.gmail.com
Whole thread Raw
In response to Re: Generate GUC tables from .dat file  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: Generate GUC tables from .dat file
Re: Generate GUC tables from .dat file
List pgsql-hackers
On Thu, Aug 28, 2025 at 1:53 PM Peter Eisentraut <peter@eisentraut.org> wrote:
> Ok, good suggestions.  I addressed all those, and did another cleanup
> pass over the script.  (The formatting is from pgperltidy.)

I have no further comments on v3.

On Fri, Aug 29, 2025 at 1:03 AM David E. Wheeler <david@justatheory.com> wrote:
> And since I griped about Perl style previously, I made a pass over modernizing it a bit. One might argue it’s less
clear,of course; there is less alignment of the printing than in the original. 

I find the loop over @parse a lot less readable this way.

> * Use the /r regex return sequence to simplify dquote() (requires Perl 5.14, IIRC)

I think our perlcritic configuration would complain about the lack of
return statement.

> * Use {$fh} syntax to make file handle arguments clearer

With this I wonder why the variable looks different for `print` vs. `open`.

--
John Naylor
Amazon Web Services



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: new warnings with clang-21 / how const is Datum
Next
From: Fabrice Chapuis
Date:
Subject: Re: Issue with logical replication slot during switchover