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 1r6MbQ-000dcB-2o for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Nov 2023 03:11:36 +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 1r6MbO-00756k-EU for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Nov 2023 03:11:34 +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 1r6MbM-00756U-GM for pgsql-hackers@lists.postgresql.org; Fri, 24 Nov 2023 03:11:33 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6MbJ-0074cM-Dk for pgsql-hackers@lists.postgresql.org; Fri, 24 Nov 2023 03:11:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A23D65C008E; Thu, 23 Nov 2023 22:11:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 23 Nov 2023 22:11:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1700795487; x=1700881887; bh=+l HlYWbW/LO/97kHejmDpePE5Nz9uTUMAE77TMNadaI=; b=aXZEZAmD/AHLR+HQpS QJzo3mnD5wbfeWW4POf/GYxY8XEZuir/hKUx53xq7idmZBYSnsUh/Mt5jCVv3h3x yyfeno8GjkJH7s3q7BGD80Xp/Hfnj5kG3a1Fxxz7xLA39C9ewBG6Vl03fZ50SMrC PeLC7IOdttG8152ZRtnSZ7yFP0Z2eM2LpAFb/xBLJrdmCi4nsh7G7nGlfgxtt9UU OW08iwpm9hvT3szr8zYVSWRJ1KqTFtXM8WGFEWlaKQhihmOJhIIZsEpS3z4xBSlB +SuxhGrAqmbNQ53dDnS7tnAK6UErJWJB/7uD1wxAMNo6zU1xtRD5+TevPcpRMN0H I5Yg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1700795487; x=1700881887; bh=+lHlYWbW/LO/9 7kHejmDpePE5Nz9uTUMAE77TMNadaI=; b=o30K2qi6mXWR0tpUeuFT5tyyh971N HBmh+9ywWTtu9qUD5kOhtg1vmaoM+pwbb7au4/t/KUlCQhhjsuz/w4o8xYOSCAsu ALruwjhB+F2d+kZ4E9E9IBEVwGFrs3RAQkpECyGpmBATvatrAIIBcfDVgExpq1nB NRMmudH5nYKJFw5UvDEU7qmuC9C6BhEHumNETDqoqr0wU+3R+dpswkgoNUO+5RQP ykT5AdrZW5CboFRHS7KcBBH6YgtAFdLs0FWGC73nVunHE5csStuV26OrYVRYzAmX TkSaJLOIzfpFofL4AxQEFib+uL6iw0KG3BoCijYA1Oi//xKu34NnVLM9w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudehgedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Nov 2023 22:11:23 -0500 (EST) Date: Fri, 24 Nov 2023 12:11:19 +0900 From: Michael Paquier To: Peter Smith Cc: Alvaro Herrera , Nathan Bossart , Laurenz Albe , Peter Eisentraut , Tom Lane , Daniel Gustafsson , PostgreSQL Hackers Subject: Re: GUC names in messages Message-ID: References: <202311091104.l57bnizku723@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q64KTkecDBeibPs3" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --q64KTkecDBeibPs3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 23, 2023 at 06:27:04PM +1100, Peter Smith wrote: > There may be some changes I've missed, but hopefully, this is a nudge > in the right direction. Thanks for spending some time on that. + In messages containing configuration variable names, do not include quotes + when the names are visibly not English natural words, such as when they + have underscores or are all-uppercase or have mixed case. Otherwise, quotes + must be added. Do include quotes in a message where an arbitrary variable + name is to be expanded. + That seems to describe clearly the consensus reached on the thread (quotes for GUCs that are single terms, no quotes for names that are obviously parameters). In terms of messages that have predictible names, 0002 moves in the needle in the right direction. There seem to be more: src/backend/postmaster/bgworker.c: errhint("Consider increasing the configuration parameter \"max_worker_processes\"."))); contrib/pg_prewarm/autoprewarm.c: errhint("Consider increasing configuration parameter \"max_worker_processes\"."))); Things like parse_and_validate_value() and set_config_option_ext() include log strings about GUC and these use quotes. Could these areas be made smarter with a routine to check if quotes are applied automatically when we have a "simple" GUC name, aka I guess made of only lower-case characters? This could be done with a islower() on the string name, for instance. -- Michael --q64KTkecDBeibPs3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmVgFFcACgkQnvQgOdby QH21ehAAkg3flJAmdq/Dww6llPINYYEvS6PfvL5OXrSx6qiMX0B0OGiwTdYnnu/F gSMl9MaW+22PrBMRPJH99Evd7b3dap8kkY5+fU6XwD7rPOALADrjcqH7uMh9uWbI aKC5WesaBWe7/Ad7oj4LMWWqrI2E2kdEPWwUqqB8c4WjcN/t9GX15ZPQXBre+g0K NftTtTP2taPXvEvVfVjdxiqgYF+/D84SGFSmFYtaDHl6y8ChBSi4tP4o4VxVoUJ5 SKztzfOUTWyuJXjYejx9xhk2v3fMezWDzstAe2GeuyBz/AuvQ7a82WiC/ofwvrfp a7jFsgIB1aQCoZ3kSEuSaTZE9kdFax0UEAekWzCUtEUiDFG5svpd7ofrHmgMaMSh q13IEEK6Z0BqI/wiI4kAG+JoJl2MG0mF/CjtDJ/f1LaO0V8zct6iIA0BrQ7n7h1/ LY0dS3BoPW+3tCv7fKYRHcsn4RJ9Smz+4UOkjrj7OSqMxiCMjOFD98SQNcTwlxLq MB83obNDtgKLSa+XyldiNgVTJ+TVmLFXYBo17kK2sLTzNgvzjRj0kr4UJCVYagKl 4NmtUy3lNr0qXZiGq8QuGWrEmG0sRnvR+jbb6Cy5Jxw+Z7Y4oTsMOnLEkBbuTbjs 9qVd3lz8yHhR9N8MJhpM0zINFP1qMGlMXrPIgw404lh+b+7F5lg= =tSF/ -----END PGP SIGNATURE----- --q64KTkecDBeibPs3--