mirror of
https://github.com/postgres/postgres.git
synced 2026-04-04 08:45:52 -04:00
This is an extension of the UPDATE and DELETE commands to do a
"temporal update/delete" based on a range or multirange column. The
user can say UPDATE t FOR PORTION OF valid_at FROM '2001-01-01' TO
'2002-01-01' SET ... (or likewise with DELETE) where valid_at is a
range or multirange column.
The command is automatically limited to rows overlapping the targeted
portion, and only history within those bounds is changed. If a row
represents history partly inside and partly outside the bounds, then
the command truncates the row's application time to fit within the
targeted portion, then it inserts one or more "temporal leftovers":
new rows containing all the original values, except with the
application-time column changed to only represent the untouched part
of history.
To compute the temporal leftovers that are required, we use the *_minus_multi
set-returning functions defined in
|
||
|---|---|---|
| .. | ||
| expected | ||
| specs | ||
| sql | ||
| t | ||
| .gitignore | ||
| connection.c | ||
| deparse.c | ||
| Makefile | ||
| meson.build | ||
| option.c | ||
| postgres_fdw--1.0--1.1.sql | ||
| postgres_fdw--1.0.sql | ||
| postgres_fdw--1.1--1.2.sql | ||
| postgres_fdw--1.2--1.3.sql | ||
| postgres_fdw.c | ||
| postgres_fdw.control | ||
| postgres_fdw.h | ||
| shippable.c | ||