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.96) (envelope-from ) id 1w5u3Q-003jze-0S for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 23:23:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5u3O-006R3J-1y for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 23:23:55 +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.96) (envelope-from ) id 1w5u3O-006R3B-16 for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 23:23:54 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5u3L-00000001NIg-49XE for pgsql-hackers@postgresql.org; Thu, 26 Mar 2026 23:23:54 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 0E6961D0016F; Thu, 26 Mar 2026 19:23:51 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 26 Mar 2026 19:23:51 -0400 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:subject :subject:to:to; s=fm1; t=1774567430; x=1774653830; bh=j7XAWVWaJn KropetbeRkhzpWln9aBby9Xic9T6W0AMU=; b=aQd3F6CXzEqBbfcilZdZ0Pi8H5 Lq+uQZYYsZkKMr4Vr10helE/k7YESAGP42/i4X1fVSvvUf/HN0bfR5aqNq6OkAgK IWMNqLCNZ/a7CY6bjl1YgoD+tF2vqWU3a9s08IYf/FnSJKHubPJ1pULdB9sV7frN gJ4XRHISZOnto0FUPzzyErgzJRsfEUGUnags/pdKObyMlbedAM7xugzf8i9t8IIe rDkdUSRIWtmqDvRLLzrCNSabzmwuMCMfjczg3hG6oTFcCM1aDh0Ehj/FjVyOmxYA p/P+IfPz8rfcC0H1Irq8EbjHrWnPSJItELXUyypjHGzO9lOf1yzT2j2gsR7Q== 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:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1774567430; x=1774653830; bh=j7XAWVWaJnKropetbeRkhzpWln9aBby9Xic 9T6W0AMU=; b=APyOMLlsTD3i+M7peq1/Q+jUQ8wJyqffP39C6rRtRgr+Zwe9jCf sO8WPtnqgSlbZKULTK0lgw+v5riMaRXQ+AgEDviwvT/ODjBug5M74wOZsBttRMCb 2+DZoMKAZVoRFtgvDycNn/8YVx+gn9+mIgX85UX5o5cP4Slau5uhW025Ef0MXl7j 2tf8TSLZaIZnto8y5kLK7DRBf2u6AODcMrh6vn9QHWx+3kVzHOx0zQYJehmQ5y7V dYmyoBxxcvZEd3mgOb1BzAdLAWdBlLPp4slGUCT6ChO+D+oZsOW34kzS0RNAu1Q6 FWng2s/7hbq1pPEUN5bw58Wqr4uavRwtYvg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdekjeduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepgeffjeevgfevuddvjedtvddtieej heduueelvddufedtgfefjedvkeevkeeivddvnecuffhomhgrihhnpehpohhsthhgrhgvsh hqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhnsggprhgtphhtthhopeefpd hmohguvgepshhmthhpohhuthdprhgtphhtthhopehjohhhnhgtnhgrhihlohhrlhhssehg mhgrihhlrdgtohhmpdhrtghpthhtohepnhgrghgrthgrsehsrhgrohhsshdrtghordhjph dprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhr gh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 26 Mar 2026 19:23:49 -0400 (EDT) Date: Fri, 27 Mar 2026 08:23:45 +0900 From: Michael Paquier To: John Naylor Cc: Yugo Nagata , Pgsql Hackers Subject: Re: Adjust error message for CREATE STATISTICS to account for expressions Message-ID: References: <20260324203430.411331c59ca462457ec0aa8b@sraoss.co.jp> <20260325131548.4c9a0c8d05a422021b1ba76c@sraoss.co.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="TnzbiLaQO01ldoGV" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --TnzbiLaQO01ldoGV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 26, 2026 at 04:22:07PM +0700, John Naylor wrote: > I'd probably write this as "extended statistics on a single column are > not supported" (no need to send a new patch). >=20 > Any objections? None. I have found this error message puzzling while doing some of my recent work for extended statistics, because extended statistics can be created if there is a single element made of an expression in the list given in input. > Also, I'm leaning towards not backpatching -- I figure a user that got > here by fat-fingering an expression is not likely to be too confused. - errmsg("extended statistics require at least 2 columns"))); + errmsg("extended statistics are not supported on a single column"))); Now our documentation also tells that the former message is not the preferred project style (full sentences usually avoided in primary messages): https://www.postgresql.org/docs/devel/error-style-guide.html#ERROR-STYLE-GU= IDE-GRAMMAR-PUNCTUATION Perhaps something like "could not create extended statistics" with a hint describing the cause would be better.. Full sentences usually apply to errdetails or errhints. If we're on it, we could just as well improve the whole thing, I guess? -- Michael --TnzbiLaQO01ldoGV Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmnFwAEACgkQnvQgOdby QH1UYw//SQyXw67JapMuBo33oiyuk3DKCAKkXCADNCA2XO0OyrlWbf8L2iP2IJgh LcORhAFc4SRAuWirPccFQ8BPu6+5oPFqyjKVrl+76lN/80anCW/38bb7TocTrfmK 3+I/rxhw1hZXHjszzPhtaCS5I8Ba5RQumE8b2VjL/BAPb+EWM2AWXWSd97DnhTgB YLNfOeyqposJbPUb9RDUBDaXvTj379P0YMByTO5jQqWgH+ATv8Je9UJaaCXZglb1 jWqAKrR/YiKecQ9sBU35PEOgU78lqnqrbU0LwcWEQb5ScLObD2dw7fWvcuD98oBZ EBd51A/624fT60mHA9I6ILg6SCiMKFuBP87Yda6aXZs10tHK8KkzmRMeyDMnIaCm L3tvMtv1a81AvdGofQBnG5lFls6FXSWjW0rmIqktrsAoyL0cEubMKEBSJQvy26rW JjUw1UzjKooO6Gikkfhe53KGUDQuta1RmqAcSt8Sc/kzXf96amG9ZUWxh0hENVwS PHnAzSeKah34dQextjm4t1jgqY2XIfcwrhnHT3iFDKZPhacge1LxyTdkBjulKVeu vDNRLB4fvpq9xkKO+jK2VCxFDcflXiDcHfKpEC6jlUUpNJbqq+QeFn+rd/vkOo3k g92QPXOM8gldkHSKRsed5A8cV9/tZAKnjUMdjZW0eyO4tmazLY8= =QbRq -----END PGP SIGNATURE----- --TnzbiLaQO01ldoGV--