Re: initdb's -c option behaves wrong way?

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: initdb's -c option behaves wrong way?
Date: 2024-01-16 11:17:23
Message-ID: 405F4FB5-81DF-4554-9E44-8C73E98200B2@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 28 Sep 2023, at 09:49, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote:

> I noticed that -c option of initdb behaves in an unexpected
> manner. Identical variable names with variations in letter casing are
> treated as distinct variables.
>
> $ initdb -cwork_mem=100 -cWORK_MEM=1000 -cWork_mem=2000

> The original intention was apparently to overwrite the existing
> line. Furthermore, I surmise that preserving the original letter
> casing is preferable.

Circling back to an old thread, I agree that this seems odd and the original
thread [0] makes no mention of it being intentional.

The patch seems fine to me, the attached version is rebased, pgindented and has
a test case added.

--
Daniel Gustafsson

[0] https://www.postgresql.org/message-id/flat/2844176.1674681919%40sss.pgh.pa.us

Attachment Content-Type Size
v2-0001-Make-initdb-c-option-case-insensitive.patch application/octet-stream 4.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bablu Kumar Nayak 2024-01-16 11:22:20 Postgres Database Service Interruption
Previous Message Bharath Rupireddy 2024-01-16 11:08:47 Re: Make all Perl warnings fatal