Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQCUS-00HDtF-9U for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jan 2024 20:26:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rQCUQ-00FP91-PQ for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Jan 2024 20:26:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQCUQ-00FP8t-GS for pgsql-hackers@lists.postgresql.org; Wed, 17 Jan 2024 20:26:22 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rQCUJ-0022Sb-RP for pgsql-hackers@lists.postgresql.org; Wed, 17 Jan 2024 20:26:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 40HKQAJm2062981; Wed, 17 Jan 2024 15:26:10 -0500 From: Tom Lane To: Robert Haas cc: Daniel Gustafsson , Alvaro Herrera , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Subject: Re: initdb's -c option behaves wrong way? In-reply-to: References: <202401171615.uzdmkozzvo6x@alvherre.pgsql> <2040188.1705511127@sss.pgh.pa.us> <5DFF3111-8ECA-4EF5-B614-9A4C9FAB29BC@yesql.se> Comments: In-reply-to Robert Haas message dated "Wed, 17 Jan 2024 14:57:35 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2062979.1705523170.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 17 Jan 2024 15:26:10 -0500 Message-ID: <2062980.1705523170@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Wed, Jan 17, 2024 at 2:31=E2=80=AFPM Daniel Gustafsson wrote: >> Agreed, I think the patch as it stands now where it replaces case insen= sitive, >> while keeping the original casing, is the best path forward. The issue= exist >> in 16 as well so I propose a backpatch to there. > I like that approach, too. I could go either way on back-patching. It > doesn't seem important, but it probably won't break anything, either. We just added this switch in 16, so I think backpatching to keep all the branches consistent is a good idea. However ... I don't like the patch much. It seems to have left the code in a rather random state. Why, for example, didn't you keep all the code that constructs the "newline" value together? I'm also unconvinced by the removal of the "assume there's only one match" break --- if we need to support multiple matches I doubt that's sufficient. regards, tom lane