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 1wV4ql-001fTe-2u for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 09:58:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wV4qk-005yeV-2A for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 09:58:54 +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 1wV4qk-005yeM-1G for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2026 09:58:54 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wV4qi-00000001DV2-1RtU for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2026 09:58:54 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id E51D114000FC; Thu, 4 Jun 2026 05:58:50 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Thu, 04 Jun 2026 05:58:50 -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=fm3; t=1780567130; x=1780653530; bh=U/3Fi9ZNzfJAqE8Pod0+qnDeEAvSiJCA 7KxsZZOU5tg=; b=n7cpWbaudcnlPtY1XZkZ8ak69KE/PXC49MWGY8FIQpjMG2rF TJylwdbimfrmYfmUXfDcUAvNPa2ehDHML4yu9kblfipChTmT/h7BO5j659Rk1SDf k9BkwGCjUrMqUgnDAyyf70SZWK20mZkhGL2d0CEneXmrV30ENhYAL4Lbc6BlkGRR BxzFsiwlMpJb4G3+soOm7+NCMXPoqEXEb8zEU6Qvl16c5XwAAvtvDREQ62uUAHOL txmQ0iLuJw/6Nypiy4b+x17fFVNW4dD9R/kzCXMak1ARjek6t+CEqEZ68C9+DQVq qwUXjktqdfkQ59YzGX5KWYXeIyt5tkq7NiWaZg== 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=fm1; t=1780567130; x= 1780653530; bh=U/3Fi9ZNzfJAqE8Pod0+qnDeEAvSiJCA7KxsZZOU5tg=; b=H ik5+JOAJX42vrJQ0ZDRPrpr5KmbLomGqOB0f/eC9axQBAlRY/ClIYj7moP7XE6XN vJDcaXxyB/N+BdzymhjGRAi4z95jPbj8t3olMQC+fLpF2L7eVN/1ASMXv77CcntZ 5C/Gl2Gou5TaRRP1TkNoTILneD1eksofu2W1gD+V9Z6N9zZOKopuTC0r4Ybz5Qwj YTlwrBfIsqHU3M1KBbYhT/H+nZBmoMDq1dYC7yIcuDOsld2zbYeoCaTCOCyOCjFW ksQ5A/0oxsAOj8qbONqEHD8iGk8FAJH3QTsSwkIaeT6Gatugl3xP1xDZugWx7Z1/ jgrHhs4t9Z/tBiYRgxdOQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGrb3puCVi4SVmhYX1HG/1rW091NqhL0XAg4TJVRZO3RuHABbMijx9q5yoz7FQsLv SPIgrCV048HNBPGMiGMeqVokbxTUsUgXbS1fYEbJPXpm/wjwzRJqg4NrvkeBHohnycBQl9 Jsb2L/+2oK+xFItnJW4UOaqQ/+2TQYOzMpSRmQbZYyIaIJsYh+2BxIcaNr8cSRtMbZsgC4 /E9FS9Ypo+jf/6rpmFDi7PCSzmds4QyozAcmv4C/rfPvSU1TsfzQHyCdo2a9GRYZwNmCQf TlL2nUyE/NzjswJVhVEQho2T9uLf3zNtypQ/cDVTtqgWRnpT6bNTLoaHuKCpXiY2bbI1l9 Im8gRM284wniJX8pBDo2MCd9d6Y1lj6SOKOGP0DbVeQBF46CrE+ijyppvSWUCQXqJNHZ4n DQc9WNIYrMdjPVHfLvjS9n9nXU3efKVOaWRTZGVRIQmUsAvNy9KvdX5Ugix3U9S0GgLOV0 oMcXYgHPyRUXMY5wQNsjTRyaI9CgRo/pVCiv5fCgKRS/GgSKS2EkvxKJf0RxER/hXqlEHR kTQ5UCRlJ2HEvm1Kx5tWB0kZt4q8yW3QkcPlEpbY+J6kx/bRdYe7t7/8qGYVeX66leeyoT hw8Qlq+CAKx4muCxZn/bNBMxkE/b4/PCmoWtJcs7WMrhwDLEgfmjzJa4501A X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Jun 2026 05:58:49 -0400 (EDT) Message-ID: <1397d468-9d00-40b3-9f92-da73d4ae50ad@eisentraut.org> Date: Thu, 4 Jun 2026 11:58:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: FOR PORTION OF does not recompute GENERATED STORED columns that depend on the range column To: Paul A Jungwirth , Chao Li Cc: jian he , SATYANARAYANA NARLAPURAM , PostgreSQL Hackers References: <27BD5D23-19C9-4FD1-8935-9C788C3C9869@gmail.com> <66C1555B-CA54-4ED1-AB4F-0EE97D24A006@gmail.com> <91B35E0F-5DC1-4417-A1B9-FAF4A3DCD2BD@gmail.com> <74C1863C-2C2A-423A-BDE7-0228889F1D80@gmail.com> 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 26.05.26 00:23, Paul A Jungwirth wrote: > On Fri, May 8, 2026 at 8:25 AM Paul A Jungwirth > wrote: >> >> On Fri, May 8, 2026 at 12:10 AM Chao Li wrote: >>>> >>> >>> Thanks for updating the patch and making the separation. After reading v11, I still have a few comments for 0001. >> . . . >> >> v12 attached. > > After discussing this as PGConf.dev, Peter and I agreed that we > *should* be checking for UPDATE permission on the application-time > column. So we need to add the attno to updatedCols on the > RTEPermissionInfo. That is great, because it fixes GENERATED column > dependency tracking and also UPDATE OF triggers, without the > complexity of changing ExecGetUpdatedCols. > > Note we still do not require INSERT permission for the temporal > leftovers, which is what the SQL Standard says and also makes sense > semantically, since those leftovers represent already-existing > history. > > No RLS changes are needed because RLS policies aren't checked based on > *column* changes. > > We still need a fix for non-partitioning inheritance, but the patch > becomes a lot simpler. > > Here is a patch adding the application-time column to updatedCols, > along with the tests we've written for GENERATED columns and UPDATE OF > triggers. committed