postgresql/src/backend
Peter Eisentraut 1772d554b0 Fix NO ACTION temporal foreign keys when the referenced endpoints change
If a referenced UPDATE changes the temporal start/end times, shrinking
the span the row is valid, we get a false return from
ri_Check_Pk_Match(), but overlapping references may still be valid, if
their reference didn't overlap with the removed span.

We need to consider what span(s) are still provided in the referenced
table.  Instead of returning that from ri_Check_Pk_Match(), we can
just look it up in the main SQL query.

Reported-by: Sam Gabrielsson <sam@movsom.se>
Author: Paul Jungwirth <pj@illuminatedcomputing.com>
Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg@mail.gmail.com
2025-01-21 14:39:24 +01:00
..
access Add some more use of Page/PageData rather than char * 2025-01-20 13:05:50 +01:00
archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
backup Update copyright for 2025 2025-01-01 11:21:55 -05:00
bootstrap Update copyright for 2025 2025-01-01 11:21:55 -05:00
catalog Fix NO ACTION temporal foreign keys when the referenced endpoints change 2025-01-21 14:39:24 +01:00
commands Fix NO ACTION temporal foreign keys when the referenced endpoints change 2025-01-21 14:39:24 +01:00
executor Refactor ExecScan() to allow inlining of its core logic 2025-01-21 12:53:03 +09:00
foreign Update copyright for 2025 2025-01-01 11:21:55 -05:00
jit Add OLD/NEW support to RETURNING in DML queries. 2025-01-16 14:57:35 +00:00
lib Update copyright for 2025 2025-01-01 11:21:55 -05:00
libpq postgres_fdw: SCRAM authentication pass-through 2025-01-15 17:58:05 +01:00
main Update copyright for 2025 2025-01-01 11:21:55 -05:00
nodes Add OLD/NEW support to RETURNING in DML queries. 2025-01-16 14:57:35 +00:00
optimizer Fix setrefs.c's failure to do expression processing on prune steps. 2025-01-16 20:40:07 -05:00
parser Fix parsing of qualified relation names in RETURNING. 2025-01-17 10:35:07 +00:00
partitioning Update copyright for 2025 2025-01-01 11:21:55 -05:00
po Update copyright for 2025 2025-01-01 11:21:55 -05:00
port Update copyright for 2025 2025-01-01 11:21:55 -05:00
postmaster postmaster: Rename some shutdown related PMState phase names 2025-01-10 11:43:00 -05:00
regex Support PG_UNICODE_FAST locale in the builtin collation provider. 2025-01-17 15:56:30 -08:00
replication postmaster: Rename some shutdown related PMState phase names 2025-01-10 11:43:00 -05:00
rewrite Add OLD/NEW support to RETURNING in DML queries. 2025-01-16 14:57:35 +00:00
snowball Update copyright for 2025 2025-01-01 11:21:55 -05:00
statistics Consistently spell "leakproof" without a hyphen. 2025-01-14 13:50:54 +00:00
storage Add const qualifiers to bufpage.h 2025-01-20 11:06:57 +01:00
tcop Use PqMsg_* macros in postgres.c. 2025-01-07 15:34:19 -06:00
tsearch Update copyright for 2025 2025-01-01 11:21:55 -05:00
utils Fix NO ACTION temporal foreign keys when the referenced endpoints change 2025-01-21 14:39:24 +01:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Update copyright for 2025 2025-01-01 11:21:55 -05:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls.mk jsonpath scanner: reentrant scanner 2024-12-24 23:42:41 +01:00