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 1wD44X-002ZN0-0W for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 17:30:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wD44U-00196X-0T for pgsql-hackers@arkaria.postgresql.org; Wed, 15 Apr 2026 17:30:38 +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 1wD44T-00196O-2L for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 17:30:37 +0000 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wD44R-00000001GEV-23u7 for pgsql-hackers@lists.postgresql.org; Wed, 15 Apr 2026 17:30:37 +0000 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-7dbccf6a23dso6749386a34.2 for ; Wed, 15 Apr 2026 10:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776274233; cv=none; d=google.com; s=arc-20240605; b=Vz10nsBsN/UNXWepa8Itg0TN3fnSIqyOryZvY2xWKaq6gNgyvCSe+0ohOfBgdtwp6+ Ou18/o2fbaw4/9riTpGylu+uBve3VrH+IB+wHgmLWE/QB9l0kFsNwYFQAwJYV6iuigbG lD4VLQb2kAc3xQFgH8n9NjkwjlaeX+6YWv2kEah3BOOnkU4NIRighO/INi3h24BNMAva zOPIekEfeTu1KbzezoWSvypenIHi9Myr589kUHSWuv3LPmBnE3X7XD0jWIL+XjAru/Ku WbEo7JwLcEJ+xalUVYzVO9TaKgNNa2BJ0YuaveJFCR4/aNDu34Ut5hqxtaknEmk0TfoR CZDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=7r2/cCqkjthDlnRfi5Fzy7f8AlJ0w3uPQVmVV4zm/+A=; fh=2vbBgHYg4HI3liLn9i7KYaQMUvSKAuhAtWv8BQxKsUA=; b=Ak4XTTk8QSaBuqlusfhOUl/rUF4pWxt/AsCWczRnlL/fjk7zWJxYnegt8zYl/X5vOK uRQeeGE4S9jMFcg7eVSXWbOSYK3FiUNkNeC7LyIIb0r8ZZZVKiZ2HSqiH4n8SIRr1s9o 7PuFN1Kl1k8j6DLpydt3DTqHODeirG5yJK8A5EB8tlnQGxCTlNJ6jnYKdqYqtPtmFXQ/ 0iKP+LuSMK/YbEQBpmT3i8SU1W6P8tFVAGq9SvkZKWAIYASdPcF+frtGpCVNE+vq8Su5 AFhv82IR+Bfn+MtfoNPsKT0XabWE+/Xik0LVHRqz8QyQOK2rPrs7M5FFw4zVmke8fxTa eMSA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=illuminatedcomputing-com.20251104.gappssmtp.com; s=20251104; t=1776274233; x=1776879033; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7r2/cCqkjthDlnRfi5Fzy7f8AlJ0w3uPQVmVV4zm/+A=; b=I9TCMLnujFUofXW+HCczBy/Kb4g38lMz9E1GxX0rdQbfZTDmiqUY/OqbXiXYCxIHRK rqhGEA0HuT1ypDB11HihHtHAV2yl4bmYf9pGdQNPyA6m2YNlU9cxbDHcG3mxBfnbVhpg 48Pd4rvGE1RfKIktxbpsxdeTUvHCKeSZjy3RR1whFNnTBbx0z7hIdqCbxfnJs5Wmsq6c SZAYNjycD9AH5jsJ0tQ89reLhuP5tuKOKYrzIAciu9ZwnSjVAHgm/Ic6lUNG2vcgY6b3 UqPW8B6xOgIhHHPGCTAVr6gv/bv1kmCbb9VakOJbI5wYki5+Ij/iqOaVCBM5AhvgQDE4 AKcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776274233; x=1776879033; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=7r2/cCqkjthDlnRfi5Fzy7f8AlJ0w3uPQVmVV4zm/+A=; b=ofPDjEQlyt1VsP2iJA9vTtUGFZjNuD4MaxK6Dal02lX6KvBgQ8/kKvygoQ4NJlZLPC b+6zagbqDvuXa+ry8HvoSTzNDgIj53oOBbsoiIqX9jcHoOGGzi2c47Q81Pp/pw07THgN tVhSGfj96xjLpmr1MJXV4g1vG4FTeqjkNYYBv65ONtpKRZJyY1BLfMwaOjZYwY1Nvl9V NaJu4gWr6lCgdEpl1NHeKiq7DpXXFMjq1tLgV8EelfXPgzaGahL33pi01gRcxLKeZuGG 6vfKZL+TbZMw/ULHZy0QsHuz6L8xfswB/X9D1L28ugNc8KDZjnvSbD4niFwbegT5VssC Hmmg== X-Forwarded-Encrypted: i=1; AFNElJ+7aJ1EzyzVBHHpd56L7NwHqKbv3sHBtiqHG2MEjydPjB30WLujuoQz589aHwOtPJGuca6oNcVFkPfsMnIb@lists.postgresql.org X-Gm-Message-State: AOJu0YwmUnJ9GQDGtpinFYAKY9mvhO/1A3GG2wEysHI5fUn3AFeRF4Ou wmf2O+zESmuMWdalUBQrTfjRlcDAygaWhtAgUV6PhfPcuwRoQa+VBq0br/Y4Q6gMNLlhICqe8jm WKQz7cOhV7sGuTvOn4at3PL2iNjlg3dMirGfZUMI1/Q== X-Gm-Gg: AeBDiesE7W4aQj5UsBvwrabJpb7R4mj84MHj7un28bPvNBLxBuRYoVpjHYGQ1hkx/bs ww380wcGtI6pSehmB6xQG0HABr1PP2MAymlcYBM0I80ewc8gf/N4sWpgZhTLE9Q5yLLaN1lDQp6 WLjJpcbD3WCcfbKzoZgPLmR/rztLmXGm/uzU+C6C15q3VjJFcLKfGcU3d7r6w/7UW+x6DXaXT09 UJ280jczhcDhjNq8hFA+oQ6p2udOPigImw57cnSCmUQWR+sNQJ5qoLQPftXxLB5WnkhqtcPK47P 4sVnjiK95RB8MOU= X-Received: by 2002:a05:6820:168a:b0:67c:1ea0:2c4 with SMTP id 006d021491bc7-68be5f4da3dmr11889526eaf.6.1776274233637; Wed, 15 Apr 2026 10:30:33 -0700 (PDT) MIME-Version: 1.0 References: <85ac7f0e-d95f-4377-ade0-8941fd328012@eisentraut.org> <7d63ddfa-c735-4dfe-8c7a-4f1e2a621058@eisentraut.org> <4606deaa-7d65-4f22-8a78-356c3180be9d@eisentraut.org> <53f1c094-3c29-4ef6-a9bd-dc2e7894ceb0@eisentraut.org> In-Reply-To: From: Paul A Jungwirth Date: Wed, 15 Apr 2026 10:30:21 -0700 X-Gm-Features: AQROBzDs4fyUpBv4XkyZO4TgfrzPMV5VkNpbnl8jM-dDUiMevv9qcfw7hf0FF0Y Message-ID: Subject: Re: SQL:2011 Application Time Update & Delete To: SATYANARAYANA NARLAPURAM Cc: Peter Eisentraut , Chao Li , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Apr 14, 2026 at 10:34=E2=80=AFPM Paul A Jungwirth wrote: > > > A BEFORE UPDATE trigger that modifies the range column creates overlap= ping rows. The trigger widening the range doesn't affect leftover computati= on, which uses the original FPO bounds. Result: updated row overlaps both l= eftovers. > > I'm working on a fix for this. It's not quite ready, but I can finish > it in the morning. . . . Actually I think the proper behavior here is to raise an error. We forbid setting the application-time column when using FOR PORTION OF (per the standard), so why should we allow a BEFORE trigger to set it? I think it has the same inconsistency problems. We could support it, but then why not support both? Assuming we want to raise an error, I think the best way is to check the tuple in ExecForPortionOfLeftovers to see if a trigger has modified it, and in that case raise an error. What do you think? Yours, --=20 Paul ~{:-) pj@illuminatedcomputing.com