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 1r12ps-0092e4-Pc for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Nov 2023 11:04:33 +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 1r12pr-00D312-5y for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Nov 2023 11:04:31 +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 1r12pq-00D30u-0g for pgsql-hackers@lists.postgresql.org; Thu, 09 Nov 2023 11:04:30 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r12pm-005WDa-8S for pgsql-hackers@lists.postgresql.org; Thu, 09 Nov 2023 11:04:29 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 810055C021D; Thu, 9 Nov 2023 06:04:23 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 09 Nov 2023 06:04:23 -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=1699527863; x= 1699614263; bh=/SXG2ii2DHeAZIPtT/mqmtJZ0dvzd8mOgyj5DZ7wDwo=; b=W fi9GNPCVWdnWzTiPyYvMgqMKz95mexg6R+VFbOGp13Q+5i7V2lIgLvNrqvJfzjW0 nwLw+rUyG0fOey+HgmwwS+sm7wbawQBwBWAjqoSof0jkTYJj4KujDqlpIKjjguTV KbeCsKEKdHB+in1+oFRD3K8Z3YU4+YjZ9oJS4YiPfoANN+8H+r0yFNvINeIwVPG9 EamxLnJO1LijCJ+spGZ762NtT8VyCrjd0qXAVaxSPxiUWYmajtwmzHoTpiNnJUex XyPVbAP+03KQzrmgk8b9+MwrX2SSjN4cKjllbjgcK6aeoeEYmLDmfIdfkgoRnCo8 j2XTixC2cNIjPqHcGXJsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvuddgvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Nov 2023 06:04:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1699527861; bh=YuKrJwrg9IQ7nkYUgMPdsnFm2zfy2wVHpDRBhFKZQHo=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=gWFy20ho4qNEYF449zRCajtH550IxhaCg5zxw92qtPFLWkkU9z6Z9iIglrvaIMWsK Zpe0vB5d1G9UT4qdVsNb8OVdaJqLFYXO/XuyBBjlxuC/hZwTVu6fPKzvjkYK0qv55W 4KxCL84lSHHz4FaR/M4sFkIdlICgNZ+cxdEkmTMbuoH5vU1+CAw2sLKNmHrstLbIf+ VoPb5EDNeg2mIAtF8QcZiLk4PNpUGYwjhuYlYyPt5THgvUz/NDkUFh9jTbP8EVANah iKe+qGCIdPJ2gZk3A/a+Jb8k9dzhxmKmCQTxXVhZuNIk5FlmML39vLBby7QBWJrTuB +QlsJrvSzRJNA== Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 19757C1; Thu, 9 Nov 2023 12:04:21 +0100 (CET) Date: Thu, 9 Nov 2023 12:04:21 +0100 From: Alvaro Herrera To: Peter Smith Cc: Nathan Bossart , Laurenz Albe , Peter Eisentraut , Tom Lane , Daniel Gustafsson , PostgreSQL Hackers Subject: Re: GUC names in messages Message-ID: <202311091104.l57bnizku723@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Nov-09, Peter Smith wrote: > Notice that NOT QUOTED is the far more common pattern, so my vote > would be just to standardise on making everything this way. I know > there was some concern raised about ambiguous words like "timezone" > and "datestyle" etc but in practice, those are rare. Also, those GUCs > are different in that they are written as camel-case (e.g. > "DateStyle") in the guc_tables.c, so if they were also written > camel-case in the messages that could remove ambiguities with normal > words. YMMV. Well, I think camel-casing is also a sufficient differentiator for these identifiers not being English words. We'd need to ensure they're always written that way, when not quoted. However, in cases where arbitrary values are expanded, I don't know that they would be expanded that way, so I would still go for quoting in that case. There's also a few that are not camel-cased nor have any underscores -- looking at postgresql.conf.sample, we have "port", "bonjour", "ssl", "fsync", "geqo", "jit", "autovacuum", "xmlbinary", "xmloption". (We also have "include", but I doubt that's ever used in an error message). But actually, there's more: every reloption is a candidate, and there we have "fillfactor", "autosummarize", "fastupdate", "buffering". So if we want to make generic advice on how to deal with option names in error messages, I think the wording on conditional quoting I proposed should go in (adding CamelCase as a reason not to quote), and then we can fix the code to match. Looking at your list, I think the changes to make are not too numerous. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Nadie está tan esclavizado como el que se cree libre no siéndolo" (Goethe)