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 1uDKNS-009HR5-1E for pgsql-hackers@arkaria.postgresql.org; Fri, 09 May 2025 09:50:46 +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 1uDKNQ-009zSl-SK for pgsql-hackers@arkaria.postgresql.org; Fri, 09 May 2025 09:50:44 +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 1uDKNP-009zNq-Tg for pgsql-hackers@lists.postgresql.org; Fri, 09 May 2025 09:50:44 +0000 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uDKNM-00104t-0I for pgsql-hackers@lists.postgresql.org; Fri, 09 May 2025 09:50:43 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 93D751140170; Fri, 9 May 2025 05:50:37 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Fri, 09 May 2025 05:50:37 -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=1746784237; x= 1746870637; bh=wlC8EX6T9wGZAQ6+KVGJOJwk79aTkAMHlx9fx6gfI88=; b=Q WrwsFLA0JTIiesrVXI7s2A2sbKPEwdeQg+rP6frwAepBxOXKfdp9IXnOa/hAdb83 N1GRWcx91FNN+lpKmxtjwSLZ1l6Oh/VTXUjTM+dKaSDbOH9SdRgydIwIaFcZqxKQ nV+PjTinUQNXnq1SAudWsNQnmx32lNBATgzPLN/99lIud1J3+I/RPn+pKcAuSBSj LmzTn0w1Q2jlpaEMmU+S/sSB/hhrwvpp1K0W/efNFrvZkJPvwzzEeh/ZTLH4AsU4 j9pEF8MoMHRiJHw6YSia4fniIFJUXTk483dPo52BDuGyyrv1E6kkeZAXKl2fjCQI yeLfLKwaoaZBysu/jiESg== 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=1746784237; x=1746870637; bh=w lC8EX6T9wGZAQ6+KVGJOJwk79aTkAMHlx9fx6gfI88=; b=wNtw0mtJSWFO5jhxf SHkpQUWOIXZmL6wT5BmaoHZtrktIaNr72oO4SWZMmJMQY8Jl+opbX7t0zPdZn6Ye KmjrdMnG8xR9PS0dCr4T/42J8/zP8koQGJeevO9/dE5u2G4SXNhlKanDrcOAwa2G UEPkmdKgbjg8vIRxV+8CLWijjPXHXqddXHxHlgDgJ507goyiiJZUQrAGLL7AScD5 v1oXz5eU0vLSQg6bwlSMsYlDw74m15M5TWdiTqzHVQimE0LyvaqD+GH+Z5x5ADvk kRc1ERiFA+oKiCfs4nsXPYERcz5cgpUaVffq4LYrX3OusSuKjsngGRNO24bpMBBV OcCvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvledvfedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhf fvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhr vghrrgcuoegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgeqnecuggftrfgrthhtvg hrnhepieehheekkeelgeeuieefvdffgedtudegffehheeffedtudfhtdekfeelleekffej necuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgeskhhurhhi lhgvmhhurdguvgdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepghhorhgsrghnhihovhgvshessggrshgvrghlthdrrhhupdhrtghpthhtohep ghhuohhfvghnghhlihhnuhigsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlh dqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 9 May 2025 05:50:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1746783864; bh=gxn8e5CIpHa1Uc6cBJGvbucbhJOAF0ZQGBPGuECHhho=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=tV2Oox/B/d79Z8X2TprL/6kNueuVdeNtrUDusWSHja3F5Up4xdsb2XFj29tsSq0Tl k8wSqwGrRZrIdhyuXlzmppytFqfbvfvEMErYT8RvBxe3xdvL2qRAl8eFErSAH0/QDO cZ9fSHA34n+VAgczKasdvKA5zQwGrqJea6DNEslneSoQ7stSYw6sNHRmkco3HQqAQ7 oTFI9XM0Sv1kE5LgXLLlvbnTDjTidhXXILSZv9CZjEc5LHbw3Y+lxe2oXPx+GYmiZe NQHusqYZ+ZbAetc1fQh7cUqvnTJtjOWY6QtacdVBFc2O1k5z7qVcLAm35TrQmoA0VK /Z9zkKk+z5cHA== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 821938F; Fri, 9 May 2025 11:44:24 +0200 (CEST) Date: Fri, 9 May 2025 11:44:24 +0200 From: Alvaro Herrera To: Richard Guo Cc: =?utf-8?B?0JXQstCz0LXQvdC40Lkg0JPQvtGA0LHQsNC90LXQsg==?= , pgsql-hackers@lists.postgresql.org Subject: Re: Assert failure in base_yyparse Message-ID: <202505090944.r3xezoufcxcg@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 2025-Apr-14, Richard Guo wrote: > It seems what happens is that internally in gram.y (~line 14274), the > DefElem for the not-null option is assigned the name "is_not_null". > As a result, this allows users to explicitly use "is_not_null" as the > option name. However, the value provided for the is_not_null option > in this way might not be a Boolean as expected, which triggers the > assertion. > > I kind of doubt we should allow the use of the "is_not_null" keyword > in the xmltable function. > > Hi Álvaro, what do you think about this? Hello Richard, sorry that I failed to notice this earlier. I agree that blocking the index from using the option name that xmltable parsing uses internally is okay. Maybe we can rename it to something like "__pg__is_not_null" or something like that, which would reduce the chances of troubling people; the existing name sounds too much like a valid name that users could want to use. Also, maybe rather than just "syntax error" we could say something like "option name XYZ cannot be used in XMLTABLE". I wonder if we have any other names used by the parser that can cause this kind of problem. In a quick look through gram.y I didn't find any other place that would fabricate a name and also accept arbitrary user-specified names to use, so this seems to be the only place affected by this particular bug. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/