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-10-24 17:08:26
Message-ID: CA+renyUiEu2yTHk+Vy-Rt2xA5Vnp2N_ohN=npiNmMKTh53qDfA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Oct 12, 2025 at 11:43 PM Paul A Jungwirth
<pj(at)illuminatedcomputing(dot)com> wrote:
> > > Here is another update, now with working PERIOD DDL. I also fixed some
> > > new post-rebase problems causing CI to fail.
> >
> > More rebase & CI fixes attached.
> >
> > Rebased to 03d40e4b52 now.
>
> It looks like an #include I needed went away and my patches stopped
> compiling. Here is a new series.

Another update attached. The last CI run failed, but it seems to be a
problem with the cfbot. It had several green runs before that, and
everything still passes here. The error is:

Failed to start: INVALID_ARGUMENT: Operation with name
"operation-1761179023113-641c8720efc82-b98ffe61-7c88ff25" failed with
status = HttpJsonStatusCode{statusCode=PERMISSION_DENIED} and message
= FORBIDDEN

These new patches have some cleanup to the docs: whitespace, a bit of
clarification between application-time vs system-period PERIODs, and
removing the "periods are not supported" line in the final patch that
adds PERIODs.

The first 3 doc patches all apply to features that we released in v18,
so it would be nice to get those reviewed/merged soon if possible.

Patches 4-6 are another group, adding UPDATE/DELETE FOR PORTION OF.
That is the next step in SQL:2011 support. I think it is hard to use
temporal primary & foreign keys without temporal DML.

After that the patches are nice-to-have (especially foreign key
CASCADE), but less important IMO.

Also I apologize that those last attachments were out of order.
Hopefully it was user error so I can do something about it: I recently
switched from Thunderbird back to the Gmail web client. As I write
this email, Gmail is telling me the v57 files are in the right order,
so hopefully they stay that way after I send it.

Rebased to c0677d8b2e.

Yours,

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

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bykov Ivan 2025-10-24 17:16:43 IPC/MultixactCreation on the Standby server
Previous Message Jeff Davis 2025-10-24 16:54:45 Re: Change initdb default to the builtin collation provider