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 1wNBjq-000dc5-1a for pgsql-hackers@arkaria.postgresql.org; Wed, 13 May 2026 15:43:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wNBjp-009geA-0T for pgsql-hackers@arkaria.postgresql.org; Wed, 13 May 2026 15:43:09 +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 1wNBjo-009ge1-2m for pgsql-hackers@lists.postgresql.org; Wed, 13 May 2026 15:43:09 +0000 Received: from mail-oo1-xc2c.google.com ([2607:f8b0:4864:20::c2c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wNBjm-00000000QGE-1qZ3 for pgsql-hackers@lists.postgresql.org; Wed, 13 May 2026 15:43:08 +0000 Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-694932346a1so2548275eaf.3 for ; Wed, 13 May 2026 08:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1778686985; cv=none; d=google.com; s=arc-20240605; b=GBOuSyXkj5G8rDmhaTeLiEkWvkAsb4ca7TapGJEBLrB6+iiPdf9P0H3g/1CkolgVl9 NCWS1k503f4LQeSEyRpBciMOo9kO7tjA2fPjep7FuIliN79pSAu7U/rjP44OOmA9yIeI dDITX+aQaO88Nj07J1RTi9ulqCx/xo3i6fZL/U8ACKIjsHbxLMICf+KE7mjSQV7ohBr5 KMF0eYKdcAP5269kWz38F4okheNvpe7EzmEZ0wGU5qGZMVVW7NJN0g3pc5JXGCsS1kJz dr4WK+ahLRGwlMAxspiWEVC7+gkEZB0XaGrmOE6bliG5+OGt34jl63fJ7MMbfEVtckce 3taw== 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=jHSYNqir6Tjy/AJeGJ8vgiRHx6uzs7mqNjSOiE8IUVI=; fh=wDETPp+0IzcQ6mFnPjuESnv2QLtol76ayETpf6v/9Sc=; b=gpda5XruZDa0L++fDymLoWHWQ4/9Zcm4z8UpxfOo9JY/4cc+4jBcy8O/a0X/r98KK2 hSA5+AfpbmETOJAr8Iz6LxCW2aOVguQmH3UA0cRTFFUEl6SIzzsq2WcLasRN89nxWGex UmfVOuqQc4tGvYkAvv8qSR0pvYZgVqLRvQRbSW/EUUGFNFULNwwzpiJPtTY+TXX6N4dv ig8BEhOLn8rr84uXETL54jgWHC3RKeVDYvYEqWdg/tpK7UIaWWv+fBfZBL8P+ZKzZxV9 oE99jTBLJE27vA9kPVAdlYuEpoBu51yI7TdCfcco2YPNKt/JqF7+5TRkDcKaCnpxEEf5 SEEw==; 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=1778686985; x=1779291785; 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=jHSYNqir6Tjy/AJeGJ8vgiRHx6uzs7mqNjSOiE8IUVI=; b=bys1gAmrUoybpvMZfgumjNvNVaJG1D6s1YGoPVcCxVGIAJEpEIp8fIJl5Xa4yo2MUI CVhg3sjvWoWRbdDdG/iinhk8TPikx64puZbz170VokrljaXNygYech5hgLtjw2YSwIUm roHWxWpUa6vmDq951iutMBRPYTh1PRW825lOajC9apQ+HwzaxMJNPoTepoa1FSxgL3BU ovrM5UDKuv/B89j/z/HQN+A9YnjDVHuq8U23f6iWocva1zUCmcpsI1VBgvoeqK/1HQGF W3bAJkVAptjcvYMk/m1mvBg9LiSu6BmDIJeyKp5dqGaInkhX7YmNgb8KIKgtdn+8+93y jo3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778686985; x=1779291785; 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=jHSYNqir6Tjy/AJeGJ8vgiRHx6uzs7mqNjSOiE8IUVI=; b=I1BL1KElz0xf9ycXNtZTo3vTRjlBxOWkTPxtipkieeJc6Z4C1G3v1Yh5mOtSGNtUgb 6eU0amognC4AhAZRiAMMRCM24do+eykWf4eLp2Tq05u4pu2k0GePtHqdTuq7z/nPcmeh TzEoZKxcgxnI/JRGMLNc+tYfJ0+28i46+QaiZLxKddgEpaLOAHkJe5zdRh80ZewpfZnH apXfH3cQAc7HU2hQB7vJbGSvfRvRB2VJvUMtlAjlRD7GRGjxrJIzS9bRpdJ6y3SkBMbw sOhws9k46VZ3aX86JWT+Mm25GxMRNNz283Thraur941ADnrFtjljfUyjOnSgEwXF3u7P dYrA== X-Forwarded-Encrypted: i=1; AFNElJ8s161NbMenlqGzrKXDKG86RU4K89xtedSOPy/mmjaw1SkaBhoyRqRPsERUA43+AnAMrkb6le4766+2I/aR@lists.postgresql.org X-Gm-Message-State: AOJu0Yw0CpPbZYsdA6sXQXfiWArowxHvNXzYB2I9Fup+Mt0qP4SIKy5L rRxJZnl2vk2YHdnQc8RBuj4uObeMejobRuptjb+7RmKYT5uTu0IyTAMwlNKhvEyGWgQN/q9hcyK QqIG7p6QP2c+Bi7sB1rEd6TWGh0LXi49LBSJ8UMaKHQ== X-Gm-Gg: Acq92OHZm8njLeDVBFe2kobjfDKA/UEFDlElbYSwv3H/UL+KptVb/b8itom0F5s1ayK 9wN2co+Qpp1c2QL6G1NASrkOWQMaHXcup39sweI5nxiv3mlpUBmWdwJX34c1dyHNXrBioSX5dI2 /eyWVvyJY9wMme6MsvYC2Zx7dHrO1PUNghAVzQRJyybhURTj3fbeepHLKn1vM2hkA25LaXmPhkm BNlYkVPF7gwOlCv/In8l3eb8jjpNieQmutfFDTJApfALlTNY9FDC7dmq3UpSohPPheJTkNa44Bz eLgo X-Received: by 2002:a05:6820:4b18:b0:696:23f5:7702 with SMTP id 006d021491bc7-69b78e539a3mr2155902eaf.60.1778686984977; Wed, 13 May 2026 08:43:04 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Paul A Jungwirth Date: Wed, 13 May 2026 08:42:53 -0700 X-Gm-Features: AVHnY4KkgTQQspgFTDBYG0H_HXejfZbPh6iLVbN0WPjGlPYr1_wodU1BOOHqtrI Message-ID: Subject: Re: FOR PORTION OF does not recompute GENERATED STORED columns that depend on the range column To: Nathan Bossart Cc: jian he , Chao Li , Peter Eisentraut , 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 Tue, May 12, 2026 at 5:05=E2=80=AFPM Paul A Jungwirth wrote: > > On Tue, May 12, 2026 at 1:34=E2=80=AFPM Nathan Bossart wrote: > > > > FOR PORTION OF doesn't seem to work well with virtual generated columns= , > > either. The following example seg-faults on my machine: > > > > create table t (a int, b int4range generated always as (int4range(a= , a + 1)) virtual); > > insert into t values (1); > > delete from t for portion of b from 1 to 2; > > Thanks for catching this! > > Here is a patch forbidding both STORED and VIRTUAL columns here. There > is a follow-up patch (not for v19) to add SQL:2011 PERIODs, which will > be based on STORED columns, so we will eventually allow those (if they > belong to a PERIOD), but it seems right to forbid them for now. > > I put the check in the analysis phase to match what we have already, > but based on [1] that is apparently premature. I think I'd like to > move all those things together in a single commit though. > > I did experiment with putting just this check in ExecInitModifyTable. > But (1) the planner will already reject the UPDATE case with a > different error message, and (2) it doesn't really improve anything, > since rangeVar gets looked up during analysis anyway (until we address > the rest of [1]). > > [1] https://www.postgresql.org/message-id/626986.1776785090%40sss.pgh.pa.= us I started a new thread for this issue and made a CF entry. Please see: - https://www.postgresql.org/message-id/CA%2BrenyVRPyP5TNgEBe%3DhRT1ZR3%3Dz= WCZLXkAwp5xbWeS_TaMxOA%40mail.gmail.com - https://commitfest.postgresql.org/patch/6764/ Yours, --=20 Paul ~{:-) pj@illuminatedcomputing.com