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 1wNtA3-00192P-2G for pgsql-hackers@arkaria.postgresql.org; Fri, 15 May 2026 14:05:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wNtA0-000cLE-0r for pgsql-hackers@arkaria.postgresql.org; Fri, 15 May 2026 14:05:04 +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 1wNt9z-000cL6-1M for pgsql-hackers@lists.postgresql.org; Fri, 15 May 2026 14:05:03 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wNt9w-00000000lOb-0eJr for pgsql-hackers@postgresql.org; Fri, 15 May 2026 14:05:02 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id EA3F47A00FF; Fri, 15 May 2026 10:04:56 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Fri, 15 May 2026 10:04:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1778853896; x= 1778940296; bh=RWjgUtG0O9Ie8gYAu1F+wskzypZi86ee8veTifZUY2o=; b=T 3AWmmlwRFBS8XjzUQmqFsxNBpAxfwS/YkEk6VcutBAXLEK2tpgjJtGbrXPR6SG5R fMhPyrmdhUCjoTPPujNMw9S5UIMa6wtLC5vMx3CgO2XnaJTqVxgRNehtxpAg0Mm1 rsRHYZISZw6keAV7lt/EEowsoK8vcaKilmWUsaZ5dSNGMgB263n0fdfspGIcEix+ H4t+NzKVawuC5SjorVPh0Luqmsvf6oMKlsXOMz1dANJkq5yJUr5iJD2LIs/GGWDI 3KrXG4sP7aWTBXq8xO2u43ZCk/Q2uKE7L99FlbI3ciP8yjwCOAOt92BnZ09hSNSi 0i76d2zo02OeXSwL5TeMw== 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:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1778853896; x=1778940296; bh=R WjgUtG0O9Ie8gYAu1F+wskzypZi86ee8veTifZUY2o=; b=dQtoPkOiTTQBIUWTc 0kaBYeUZAH5iuVmGbuW5xnK3vw5fJFvHoAqgIs2Z2Ns7JHFlFeIOSD9QAy4BIZE+ eFBMidQ1+R9BwpKoW1smV/WhiXr4ZzmRZsRMS9X94k4jTDaz9ZQnBdOvw79r38HW ghLEbiYrPJg+kzXM4InnwPqYKA7LFwLoyxExaEqVMpXU+h/37bGXc13JYY/u9m7T xdugT6CazSUbnnHUG7nzwm5zSPtmK2DiGQ21o/aUOaAHHwr/Pqbw5YRhlI96aQJ5 YlqlwhfIRlUVnv+NZz3kuawMhAOtPe89fxYpCHsxWccCgMA2oLOWotQZBOnvxV4Q RRL8g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgddufedtheelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdprhgtphht thhopehjihgrnhdruhhnihhvvghrshgrlhhithihsehgmhgrihhlrdgtohhmpdhrtghpth htoheprhgvshhhkhgvkhhirhhilhhlsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhg shhqlhdqhhgrtghkvghrshesphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepth hglhesshhsshdrphhghhdrphgrrdhush X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 May 2026 10:04:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1778853892; bh=0Fn24b9ScNCsEFfSvRxNkrW6rlDeQoaZX8GqVbbkeis=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=zSEtMbCLu3MLpjRj414zoYl7J7TNiT2CycxFziMznZq2ceMO1xRBx5f9qkYblVsew ToV7VBmfIpyAAgQj3+6IQfA8M6xLFuMxulO9OEj5BFWk/Yy+8gsMgcI9oW020Vsq0t wdk95lYNH0uLYyga4zTzQbnzG4FLPKfCht4VMOo8TafUWyOmkKJ+s3qtPaAzzuFPQU Enfu+HMet2HknxS9L3vdhLS7AtUQz0YuL0NPYQ7SSGJLIijMpT2kDUZ919yS4smfFZ +HBJ4xHQ7VdENUTY8VrextH4sAGLnM5Tw5+1ud0XlMA6vRFC3utQR21Bz4FdGE/a4L jN+SFE4Kp1p3Q== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 6046CB05EEE; Fri, 15 May 2026 16:04:52 +0200 (CEST) Date: Fri, 15 May 2026 16:04:52 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: jian he Cc: Peter Eisentraut , Tom Lane , PostgreSQL-development , Kirill Reshke Subject: Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt Message-ID: 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 2025-Dec-17, jian he wrote: > diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h > index bc7adba4a0f..326d30cfb2f 100644 > --- a/src/include/nodes/parsenodes.h > +++ b/src/include/nodes/parsenodes.h > @@ -3551,6 +3551,10 @@ typedef struct CreateStatsStmt > List *stat_types; /* stat types (list of String) */ > List *exprs; /* expressions to build statistics on */ > List *relations; /* rels to build stats on (list of RangeVar) */ > + List *from_clause; /* FROM clause ((list of RangeVar)) */ > + List *rtable; /* It’s not derived directly from the > + * parser, instead it comes from parse > + * analysis. (list of RangeTblEntry) */ > char *stxcomment; /* comment to apply to stats, or NULL */ > bool transformed; /* true when transformStatsStmt is finished */ > bool if_not_exists; /* do nothing if stats name already exists */ I'm unconvinced about this, and I wonder if it would make sense to have two separate nodes, one which is pre-transform (direct out of parser) and another which is post-transform. Would that things a bit simpler? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "We have labored long to build a heaven, only (Prof. Milton Glass) to find it populated with horrors" (Watchmen, Alan Moore)