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 1wgcuZ-006IcJ-0w for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jul 2026 06:34:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wgcuY-00FNF7-0b for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jul 2026 06:34:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wgcuX-00FNEx-0c for pgsql-hackers@lists.postgresql.org; Mon, 06 Jul 2026 06:34:33 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wgcuV-00000001lgj-1GWI for pgsql-hackers@postgresql.org; Mon, 06 Jul 2026 06:34:32 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id E69F77A00F3; Mon, 6 Jul 2026 02:34:29 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Mon, 06 Jul 2026 02:34:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=1783319669; x=1783406069; bh=iSVyyHHlUnqt7SG8O3NLZ0/eH+VpZ3jd LYRBKprwOnI=; b=Y0HanOJxsLRnutsMTWpzXUG/IWX+Y9C1gds4m+t3jg5mIseF /dOAt3SL7QdGXMJydHrG0/ziO8eEc7lB7o0kan4nfDK6yq2bwEIDh9BGVug04LFK hXJ8QVZr7L64ebW4KNQI5GqL4SjqtJX2xzgBAGouzxhqOeM+rO0jOneLS4f17GGO vVVVyYCpYEkFGY72P39mCSryeYZX71OAMJ+ygKdNvR55nqsckMvq/cncyddZhAsW yTd9YahJ1Se7uORNr0J85RIDk7572NpI7K6Bm0nMHJixRYZ5rXzJFSYcLWgs9Gv5 R8JNLw9pnlL90R5S65exKOoNa34n8ZfdzrnMXg== 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 :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1783319669; x= 1783406069; bh=iSVyyHHlUnqt7SG8O3NLZ0/eH+VpZ3jdLYRBKprwOnI=; b=V DXdYPdgAD8D5wzssEpzjttX7eDRW5TJ4Gn7oc3G6j8ngYjNAtv7YZgUDrEisylK0 wlqzwsIreBdU7odr+0cgdA1/FWM3/L+NhPSsPuMY1GGVy27W2o487nQg7l3Hz8LM oH7liDXFrF9K3Z8razmPn2mTOxLh4CJuLxSHVAdUbauDkX2++7Wpf9duVOI/PPt4 a5NbCpLe9+XuZRz5nuss4Ow1x2dT+3MmX4z6gCAacJuKkDb3JKyyHpAEkuhJRZYz I2gg6aj4z+wzRFaP3JVzRmUx9CmsWjnTu6o85toNll2JxkEY1S/OWJZfZeXS67u8 hvhIPFk4UEqy2/WpJXwkQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGwPfq34H0AF8YSeZr6RSh35mzhf1MTYghxy4dLns33I33IXyBB7cHWNK45D33+de hCdvkxQCdKG+tQyopi5RVx3YOHfut5oMO0Dj8JO9gb9R/Ak6CC2M8SJs9mQ4t/pppsHj7g Sy9HdmFsNrJWTL+9pDrrg3woyjKiH9lrgLcgUFbvogM7LeMFW4sWDbucVA/gVLpCQ82f05 zUAK672Jqgij2TRUIvzIIDWI+pJj9PePlcDTz8hgI0M4qV7om10+pHXFGK9s2/TvmVJ0Pz 8jT1XYHZWLL2NQbushddCQgwSCyWKQ9fRy/NyrZMPD0583jzGo3QS2RBhQLavCRXUXhfLA eL6sn3BvZq43kP8ebFfZCzDBM/f3i1yLMxkIKyr9fa7cJRt+EUn9xSyl6OQedLRf037sTM npUNLdmgBXZIEW11q7AqnLMr6tfiLKTHc0ZO/iuCxJLEOau1CwOHWzBcPdo00bXV+psET6 BFJVBGrEeH1BhJBFwIMyWSWzs4ndnSCN8/PS37Q59lPgOS0Rji0q6ppruLLYoTwxWXi9KY aK7f8JVIIiglgL8+7CqAbokTaeoP34DbhKwJgLGHkOdqKRxL+MJECByaqSqOaShqdO+sBb 2BlMNxP9x6+zkAeDfBo1UuRGXVajq8mHVROJ1tUf5NbRaFe82CYPxqc5r4Uw X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jul 2026 02:34:28 -0400 (EDT) Message-ID: <391a2845-105b-4048-a113-835c2742fea1@eisentraut.org> Date: Mon, 6 Jul 2026 08:34:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fix null pointer dereference in PG19 To: Paul A Jungwirth Cc: Aleksander Alekseev , PostgreSQL Development References: <626986.1776785090@sss.pgh.pa.us> <84f20d0d-3bc8-4843-bd7e-21bce20f8582@eisentraut.org> <4984118e-0dc5-49a9-b279-fd0b707be8e0@eisentraut.org> Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 02.07.26 16:29, Paul A Jungwirth wrote: > On Thu, Jul 2, 2026 at 12:25 AM Peter Eisentraut wrote: >> >>> But I don't mind holding it back if that's what people want to do. >>> Looking more closely at INSTEAD OF triggers, I found another bug: the >>> FOR PORTION OF qual (and TLE) were not added, so the trigger would >>> fire on more rows than it should, and NEW.valid_at was not >>> pre-computed. The second patch here fixes that. I'll defer to others >>> whether we should fix the INSTEAD OF interaction now or wait 'til v20. >> >> It seems to me that both FOR PORTION OF and INSTEAD OF triggers are SQL >> standard features, so this discussion should refer to what the standard >> says, and possibly consider what other implementations do (in addition >> to discussing what makes sense). Since that hasn't been done yet, maybe >> prohibiting this combination for now, as proposed by Aleksander, would >> be best. > > Okay, let's do that. I'll do some research to see what the standard > says and whether any other RDBMS offers guidance. Do we have a suitable patch for that? The patch proposed at the top of this thread checks for the presence of triggers at parse time, which, I think, again has the problem that the presence of triggers could change between parse and execution time.