aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonpath_exec.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-01-21 14:34:44 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-01-21 14:39:24 +0100
commit1772d554b089c4779eaa13ae1487721e3080d119 (patch)
tree3f458b0cb9ba438b42673dab27fc6b44f9c8fbca /src/backend/utils/adt/jsonpath_exec.c
parent888d4523f0c2f7e410739feff3ff97c5f3b9b3ea (diff)
downloadpostgresql-1772d554b089c4779eaa13ae1487721e3080d119.tar.gz
postgresql-1772d554b089c4779eaa13ae1487721e3080d119.zip
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
Diffstat (limited to 'src/backend/utils/adt/jsonpath_exec.c')
0 files changed, 0 insertions, 0 deletions