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 1nMu5t-0007G1-As for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Feb 2022 16:02:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nMu5s-000608-7Z for pgsql-bugs@arkaria.postgresql.org; Wed, 23 Feb 2022 16:02:20 +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 1nMu2u-0002L9-Hp for pgsql-bugs@lists.postgresql.org; Wed, 23 Feb 2022 15:59:16 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nMu2s-0008LA-7A for pgsql-bugs@lists.postgresql.org; Wed, 23 Feb 2022 15:59:16 +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 21NFx0kf1012793; Wed, 23 Feb 2022 10:59:01 -0500 From: Tom Lane To: Japin Li cc: danielpolski@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17415: Unable to use underscore as first character in set_config custom parameter In-reply-to: References: <17415-ebdb683d7e09a51c@postgresql.org> Comments: In-reply-to Japin Li message dated "Wed, 23 Feb 2022 21:54:49 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1012791.1645631940.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 23 Feb 2022 10:59:00 -0500 Message-ID: <1012792.1645631940@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Japin Li writes: > On Wed, 23 Feb 2022 at 16:36, PG Bug reporting form wrote: >> SELECT set_config('_foo.bar', 'foo', FALSE); >> ERROR: invalid configuration parameter name "_foo.bar" >> DETAIL: Custom parameter names must be two or more simple identifiers >> separated by dots. > According to the comment of valid_custom_variable_name(), the custom var= iable > must be two or more identifiers separated dots, and the identifier confi= rm > scan.l, see below: > However, the code in valid_custom_variable_name() doesn't confirm it. Yeah, it's supposed to match scan.l, so that's an embarrassing oversight. Will apply patch. regards, tom lane