public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: Tom Lane <[email protected]>
To: Robert Haas <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: [email protected]
Subject: Re: Set arbitrary GUC options during initdb
Date: Wed, 22 Mar 2023 07:45:18 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<CA+TgmoY4gndkosTZf=Zs1_SfsfO_13c7-yazryweZvLwSTHLgA@mail.gmail.com>
	<[email protected]>
	<CAKFQuwauwt+w8HbtU_-Mqo-aZ1Qjsah13E5_iFEUTVpVc1PTAw@mail.gmail.com>
	<[email protected]>
	<[email protected]>

On 27.01.23 21:02, Tom Lane wrote:
> I wrote:
>>>> Anyway, it seems like I gotta work harder.  I'll produce a
>>>> new patch.
> 
> The string-hacking was fully as tedious as I expected.  However, the
> output looks pretty nice, and this does have the advantage that the
> pre-programmed substitutions become a lot more robust: they are no
> longer dependent on the initdb code exactly matching what is in
> postgresql.conf.sample.

This patch looks good to me.  It's a very nice simplification of the 
initdb.c code, even without the new feature.

I found that the addition of

#include <ctype.h>

didn't appear to be necessary.  Maybe it was required before 
guc_value_requires_quotes() was changed?

I would remove the

#if DEF_PGPORT != 5432

This was in the previous code too, but now if we remove it, then we 
don't have any more hardcoded 5432 left, which seems like a nice 
improvement in cleanliness.







view thread (8+ messages)

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Set arbitrary GUC options during initdb
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox