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 1wL86u-001YAJ-0M for pgsql-hackers@arkaria.postgresql.org; Thu, 07 May 2026 23:26:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wL86r-006lTk-2U for pgsql-hackers@arkaria.postgresql.org; Thu, 07 May 2026 23:26:25 +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 1wL86r-006lTc-17 for pgsql-hackers@lists.postgresql.org; Thu, 07 May 2026 23:26:25 +0000 Received: from mail-oo1-xc2d.google.com ([2607:f8b0:4864:20::c2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wL86o-0000000161r-3dq2 for pgsql-hackers@lists.postgresql.org; Thu, 07 May 2026 23:26:24 +0000 Received: by mail-oo1-xc2d.google.com with SMTP id 006d021491bc7-6948ff6b006so946242eaf.2 for ; Thu, 07 May 2026 16:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778196380; cv=none; d=google.com; s=arc-20240605; b=Abe42Xx+41/TWpokk6dYNGW+kn5z/mHHogllse4mtMsStSK9VHlsNKMQqeqUamjNDU 6wDYu3ZabNLehzqjvdMsYmqB/2hbHGVYihSCxAnzpIXG5aollzL/dQddkqTzcRLmQj6y FTChZZ6KxlwpK8DO+kpnlcqsMnuLG9/mrP6sPjzo/IiM4gVaLPpNIWxfqMySSUmkXy1E JWYojgz5UV5GFnqvsZcPgkX2ayzIKxNdnlcH6vxnhNyEV65bfXefkOdf/GOqC80H7CPw KoSiXD6AhquHT/YAmgN3PFuDMsllmqLVj/bagVZ6667QLsQ5fib52OsUqr5fNzuNaQ1B 5MUg== 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=oRBqSWEtlp4jRVEw3Wj7O40zLk+aQanq3szvcKdVOms=; fh=18+0lNJqW//TV0zy8KNPTRhKvenPYAJlxWpk2aifLDY=; b=jBguMIvkBFDFKaRk85JxMXl8C+BcgWyq1qpSIGKL/hDLiJOF4ZePwy5dlJMj7iqTWJ lGH1+G+yHfr+MK7W/nyTv6rPv02SCRqBeKGT+IXaB+FRxo/hVOynn+zLrTZ47aGc9soT ukhLMNKcYUvJIV6IDetgdNCcNOrC8pl9V9B0jluzdPVJe1dGKtOWothrp7dZAvgudQTc NZBPib/RpgdfWvyWRIjWiQycXXsqOhs9X8NGgvaRr4kcy4T4Gj9m/fLCGFu7egKjLl7x TJm8azGOIjaWb8/wUWN72lRTO3FrxMEwXW0q1K+MfWwrPBunbIX6xkv/jqnin9cc3bbA yfQA==; 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=1778196380; x=1778801180; 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=oRBqSWEtlp4jRVEw3Wj7O40zLk+aQanq3szvcKdVOms=; b=Gzs1X3YNiYtG126rdIh4u/LPyj+0xq8BKt24KvvDoxAzm3UyHiqK33vX10C2PfEtLD 7jBEvgEew8UM4VR3oYUllDyQU5f2+XBL62H3XJb04W09bSQHeBgkn5HQWX+Dj/mGlFxz 8nyJziU05RuQ0aqGNWDwJWwZZfepGQzbQfAY6ngvsI5rHSwsbt0cgZXkrt1Hlm9jDVBW 44CGcxXB9pI4cr/qxApksMKa9c1TgxiiqAYHaJeZgH018+FU9GNKfSVyW4FpYj6DkDAY F4/femkJSrUah1i1UmUy8xaDt7HPZZ3vjjSlzhxFb9S2tBJagUw//yVISX693X+KxtFa muYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778196380; x=1778801180; 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=oRBqSWEtlp4jRVEw3Wj7O40zLk+aQanq3szvcKdVOms=; b=jhqT/lPqKhHnIVghrqfgNQs2v3ZBkvEol/8YjTsgzg6JAHLIqpJHmjOlkV53R9tWeR 6orKuePFn9qR32wOXS7z9q0KOHMnWyU4pYYZgqZy64eZnGo+QxFMO5erCmQLNq6Wr4IQ UYjPK/JIOJcomhF0Gkzw6a27CzrqI/QBQTI6RRv9TGGuHUpy7vDiJp2gCJh7KC8p1yKF ryFWabrMCZA6q2OttI1uQ+ByB1CutM++ZXb67X0qDq9CJZrokkq+MLU1qf6k1lrsyYgl UhfnZzCnjCGurSupB0Ts2twjaTVwKe7JTvQLc4sqwpZ2ifuYorl25E8bUZ3PPytWwTfo dAiw== X-Forwarded-Encrypted: i=1; AFNElJ8w+gkjhgpByX5w/x+ftZI7SRfO/VZnqiEjJFPN3YIipoeiSsbT6aQVEB4tbOMcI5R0hkGH62iRqJsVqP3I@lists.postgresql.org X-Gm-Message-State: AOJu0YzX34a1SkS1Gv5iDo+4HR0w3c3eC7M+repf1wJkqTv5ubhSYgRA elJIYxGz7VM3CfPzgxxahxu1z16TuNjEB825jPCcjBLHW2vE6dsPAXye5ZGTkx3SWtywi0GIMUn 1gCmfvGYzjzbB9110yva9YCTmIS2vcIil+vynbqq5wA== X-Gm-Gg: AeBDiesO0WiwubmAq98kIK4XdZiEdHUcHzcXFZo3M43pSTZ2s1LaN4u+qGRjK28lHtD QR802+gWOXK5nwErpVCG8eWtbL1GBXUIuHkciSYjZW8oNSEQOtb6QzhvFK2Y+vn/ERiKI3YCPdW 6UUj6OJKcdWsFVvVlk+EjqUHRNRM+PmGyDHLebC6mBJ+qkH2R0lszYRRTJlVFhnpSIU7X0V7fUO K196fzkL7iQ3hu2UEPxH/oE0rxGze5LP3D6Rr9h+7aisEKdeYEVdwwixpRQGlv2c5dWzNncI+SU Yx// X-Received: by 2002:a05:6820:2d0a:b0:694:6d72:9fd0 with SMTP id 006d021491bc7-69998cbc491mr6180946eaf.16.1778196380141; Thu, 07 May 2026 16:26:20 -0700 (PDT) MIME-Version: 1.0 References: <27BD5D23-19C9-4FD1-8935-9C788C3C9869@gmail.com> <66C1555B-CA54-4ED1-AB4F-0EE97D24A006@gmail.com> In-Reply-To: <66C1555B-CA54-4ED1-AB4F-0EE97D24A006@gmail.com> From: Paul A Jungwirth Date: Thu, 7 May 2026 16:26:08 -0700 X-Gm-Features: AVHnY4K9pWNTzs7VkXDIjTXAnYmYbzK_KW6uouWlRiycf7Yv22Vi4sCYS5zfqqs Message-ID: Subject: Re: FOR PORTION OF does not recompute GENERATED STORED columns that depend on the range column To: Chao Li Cc: Peter Eisentraut , jian he , SATYANARAYANA NARLAPURAM , 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 Wed, May 6, 2026 at 10:55=E2=80=AFPM Chao Li wr= ote: > > > I didn=E2=80=99t review this patch earlier because, from the subject, I= thought it was only about recomputing generated stored columns. I just not= iced that the patch also changes the inheritance-table path, and I posted a= nother patch for the inheritance-table bug. Please see [1]. > > > > I tried applying the new tests from my patch on top of this patch, and = it looks like this patch still does not fix the multi-inheritance case. > > > > So I=E2=80=99d like to check with you how we should proceed. I think th= ere are two options: > > > > 1. Keep this patch focused on the generated-column issue described in t= he subject, and use my patch to fix the inheritance-table bug. > > 2. I can continue from this patch and extend it to fix the multi-inheri= tance case as well. > > > > Please let me know what you prefer. Thanks for your help on this! I agree that separating the patches would be better. > I just looked into v9 and made a fix in ExecInitForPortionOf() that resol= ves the bug with multi-inheritance tables. I also added a test case for tha= t. > > The inheritance-table bug affects not only UPDATE, but also DELETE, so I = added test cases for DELETE as well. Please see 0002 for my changes. > > To make each commit self-contained, would you mind moving the code for th= e inheritance-table fix to 0002? Then you can keep focusing on 0001, and I = can continue working on 0002. > > PFA v10 - 0001 the same as v9. 0002 fixed a bug with multi-inheritance ta= bles. I'll post a v11 addressing the feedback in your other email and moving the fixes for partitions/inheritance. Yours, -- Paul ~{:-) pj@illuminatedcomputing.com