FOR PORTION OF should reject GENERATED columns

From: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: FOR PORTION OF should reject GENERATED columns
Date: 2026-05-13 15:39:43
Message-ID: CA+renyVRPyP5TNgEBe=hRT1ZR3=zWCZLXkAwp5xbWeS_TaMxOA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 12, 2026 at 1:34 PM Nathan Bossart
<nathandbossart(at)gmail(dot)com> 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;

I posted a fix for this yesterday, but I wanted to make a separate
thread so the commitfest app could track it correctly. Here is the
start of the conversation:

https://www.postgresql.org/message-id/CA%2BrenyWqeWxSUoohRQ4htfSLCcDVsZ%3DXwVR7F8-e9GXeH_O13w%40mail.gmail.com

Yours,

--
Paul ~{:-)
pj(at)illuminatedcomputing(dot)com

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul A Jungwirth 2026-05-13 15:42:53 Re: FOR PORTION OF does not recompute GENERATED STORED columns that depend on the range column
Previous Message Peter Eisentraut 2026-05-13 15:32:28 Re: egrep is obsolescent