Re: SQL:2011 Application Time Update & Delete

From: Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: SQL:2011 Application Time Update & Delete
Date: 2025-08-29 13:03:44
Message-ID: CA+renyXXJJCmgG0Wdf89JgVNAeRKkVn+EuZGTf4Ph-BWoJafQA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 22, 2025 at 6:19 PM Paul A Jungwirth
<pj(at)illuminatedcomputing(dot)com> wrote:
> Here are updated patches for UPDATE/DELETE FOR PORTION OF and related
> functionality. I left out the usual PERIODs patch because I'm still
> updating it to work with the latest master.

Here is a new set of patches, rebased to 325fc0ab14. No material changes.

I'm still working on the PERIOD DDL, but that doesn't have to go in at
the same time. The tricky part is ALTER TABLE ADD PERIOD, where I need
to wait until the add-columns pass to see the start/end columns'
type/etc, but then in that same pass I need to add a generated range
column. If I add the column in a later pass, I get a failure, e.g.
"cannot ALTER TABLE "pt" because it is being used by active queries in
this session". This only appeared with recent(ish) NOT NULL work. I
think the solution is to avoid holding a relcache entry longer than
needed, but I haven't had a chance to locate the issue yet.

Yours,

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

Attachment Content-Type Size
v53-0001-Add-docs-chapter-for-temporal-tables.patch application/octet-stream 17.7 KB
v53-0002-Document-temporal-foreign-keys.patch application/octet-stream 9.6 KB
v53-0004-Document-temporal-update-delete.patch application/octet-stream 23.8 KB
v53-0003-Document-temporal-PERIODs.patch application/octet-stream 1.9 KB
v53-0005-Add-range_minus_multi-and-multirange_minus_multi.patch application/octet-stream 22.7 KB
v53-0006-Add-UPDATE-DELETE-FOR-PORTION-OF.patch application/octet-stream 200.7 KB
v53-0008-Look-up-more-temporal-foreign-key-helper-procs.patch application/octet-stream 6.8 KB
v53-0007-Add-tg_temporal-to-TriggerData.patch application/octet-stream 10.3 KB
v53-0010-Expose-FOR-PORTION-OF-to-plpgsql-triggers.patch application/octet-stream 14.5 KB
v53-0009-Add-CASCADE-SET-NULL-SET-DEFAULT-for-temporal-fo.patch application/octet-stream 205.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-08-29 13:09:57 Re: Adding skip scan (including MDAM style range skip scan) to nbtree
Previous Message David Rowley 2025-08-29 13:02:37 Re: Use-after-free in expand_partitioned_rtentry