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 1r0ISR-004qu0-Ex for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Nov 2023 09:33:15 +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 1r0ISQ-006mUv-1D for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Nov 2023 09:33:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0ISO-006mUn-RU for pgsql-hackers@lists.postgresql.org; Tue, 07 Nov 2023 09:33:13 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r0ISL-0059SA-6s for pgsql-hackers@lists.postgresql.org; Tue, 07 Nov 2023 09:33:12 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 5E2205C00AE; Tue, 7 Nov 2023 04:33:06 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 07 Nov 2023 04:33:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1699349586; x= 1699435986; bh=IBUrXhFsW7WbMKJgc9kjRKsgSQNNeo+928wTaoJGuQg=; b=s Fb4lHSodIL7Jihs7D1yEgIb8a3pMwGW3bOuD9qdpYYnkq0uPjZ3QwaZ61JErTFOx HPPh3nDMcQoZ+L46dRolAnLoi5njBv4UsMYp2PypsIo7heU2/6XV9YHPtBOLuERA JwLxqo2xIfjw8/uQEYP27jqxDxaqT9tXATqMHelonme/l1Lxix4/3q8NczJii9ku 89oJ0ddl6XIKQ45hTG3pZ44dDgbyBNKalt2rDs55ogIFBm6ujf3R+LwrjD8r8Tsk PrGkD/Favj4VxSL7HTsGcMfx1zNcTSbEGYeYiLGeTVlizTPulu4lcG9rXy+n6GiT TkvHkd1MZYI8ABhg85S+A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudduiedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesmhekreertddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepudelkeekgfdttdettdekgfduvdeiffelteegjeeihfet heekveeftedtuddvhfeunecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Nov 2023 04:33:05 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1699349583; bh=n6zlymTN8uGUGISc/uqsrqNNPcgXcQNGMwPntYX8pGk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ZcNFY3TrtGbhLq7Y9oNhppJL2BraUy25N61duQiFaHROkjmXIvHRScyEsijcTzBDo QSkRFo5I5aCWCPoWPJIAXX7HZTK8pfR1rLx+OY+QcULTwbWTn6u5Cja+oMG1unq6UI JWfdzriVOEhis+Ri2MRNF36CYNTRKi8xyrKfrvOzS/I9efukBcZAhZK416QnFYZ6ln 2FbQGc0mgbnYiYMZz5qGFJN8SVb/UZ82kdvAhk7hcu7AxXRj2yPZV7UA/SY9vO3Q4M oBmVjJVpyOrc9jo9CjLW0UqjXe7UYYiLr+hqlgYLlyKuUQ5RFffNvS/Yw5dqa1zRHz HPzxrrI6oQlgg== Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 60F15C1; Tue, 7 Nov 2023 10:33:03 +0100 (CET) Date: Tue, 7 Nov 2023 10:33:03 +0100 From: Alvaro Herrera To: Nathan Bossart Cc: Laurenz Albe , Peter Eisentraut , Tom Lane , Daniel Gustafsson , Peter Smith , PostgreSQL Hackers Subject: Re: GUC names in messages Message-ID: <202311070933.ngoeikm2v4k4@alvherre.pgsql> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="sgov2mlwyhxqc24m" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231102015239.GA82553@nathanxps13> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --sgov2mlwyhxqc24m Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2023-Nov-01, Nathan Bossart wrote: > On Wed, Nov 01, 2023 at 09:46:52PM +0100, Laurenz Albe wrote: > > I agree for names with underscores in them. But I think that quoting > > is necessary for names like "timezone" or "datestyle" that might be > > mistaken for normal words. My personal preference is to always quote > > GUC names, but I think it is OK not to quote GOCs whose name are > > clearly not natural language words. > > +1, IMHO quoting GUC names makes it abundantly clear that they are special > identifiers. In de4d456, we quoted the role names in a bunch of messages. > We didn't quote the attribute/option names, but those are in all-caps, so > they already stand out nicely. I like this, and I propose we codify it in the message style guide. How about this? We can start looking at code changes to make once we decide we agree with this. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "La verdad no siempre es bonita, pero el hambre de ella sí" --sgov2mlwyhxqc24m Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Message-style-Add-paragraph-about-quoting-names.patch" From 909355851bfb21086422e6edc0b2b75fbaa58418 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 7 Nov 2023 10:24:00 +0100 Subject: [PATCH] Message style: Add paragraph about quoting names --- doc/src/sgml/sources.sgml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/src/sgml/sources.sgml b/doc/src/sgml/sources.sgml index 06d995e4b7..d72e114ea3 100644 --- a/doc/src/sgml/sources.sgml +++ b/doc/src/sgml/sources.sgml @@ -532,23 +532,31 @@ Hint: The addendum, written as a complete sentence. Use of Quotes Always use quotes to delimit file names, user-supplied identifiers, and other variables that might contain words. Do not use them to mark up variables that will not contain words (for example, operator names). There are functions in the backend that will double-quote their own output as needed (for example, format_type_be()). Do not put additional quotes around the output of such functions. + + In messages containing configuration variable names, quotes are + not necessary when the names are visibly not English natural words, such + as when they have underscores or are all-uppercase. Otherwise, quotes + must be added. Do include double-quotes in a message where an arbitrary + variable name is to be expanded. + + Rationale: Objects can have names that create ambiguity when embedded in a message. Be consistent about denoting where a plugged-in name starts and ends. But don't clutter messages with unnecessary or duplicate quote marks. -- 2.39.2 --sgov2mlwyhxqc24m--