Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNI0f-0006KL-9p for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Apr 2020 15:25:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jNI0d-0005zB-Nb for pgsql-bugs@arkaria.postgresql.org; Sat, 11 Apr 2020 15:25:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNI0d-0005yt-Hs for pgsql-bugs@lists.postgresql.org; Sat, 11 Apr 2020 15:25:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNI0X-0008Lb-50 for pgsql-bugs@lists.postgresql.org; Sat, 11 Apr 2020 15:25:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 03BFPDLH027960; Sat, 11 Apr 2020 11:25:13 -0400 From: Tom Lane To: wenjing cc: Masahiko Sawada , Euler Taveira , pgsql-bugs@lists.postgresql.org, tushar , Prabhat Sahu Subject: Re: [bug] Wrong bool value parameter In-reply-to: References: Comments: In-reply-to wenjing message dated "Sat, 11 Apr 2020 23:05:17 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <27958.1586618713.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 11 Apr 2020 11:25:13 -0400 Message-ID: <27959.1586618713@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk wenjing writes: > 2020=E5=B9=B44=E6=9C=887=E6=97=A5 22:35=EF=BC=8CMasahiko Sawada =E5=86=99=E9=81=93=EF=BC=9A >>> I'm not sure it is a bug. It certainly can be an improvement. Code as = is does not cause issues although I concur with you that it is at least a = strange syntax. It is like this at least since 2009 (commit ba748f7a11e). = I'm not sure parse_bool* is the right place to fix it because it could bre= ak code. IMHO the problem is that parse_one_reloption() is using the value= provided by user; it should test those (abbreviation) conditions and stor= e "true" (for example) as bool value. > It seems difficult to store a new bool value in parse_one_reloption. Thi= s is a string stored with =E2=80=9Dautovacuum_enabled =3D=E2=80=9C. > any other ideas? I don't think we should touch this. If the user chose to write the value in a specific way, they might've had a reason for that. There's little reason for us to override it, certainly not enough to justify introducing a lot of new mechanism just to do that. regards, tom lane