Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3db322e

Browse files
committed
Prevent internal overflows in date-vs-timestamp and related comparisons.
The date-vs-timestamp, date-vs-timestamptz, and timestamp-vs-timestamptzcomparators all worked by promoting the first type to the second andthen doing a simple same-type comparison. This works fine, exceptwhen the conversion result is out of range, in which case we throw anentirely avoidable error. The sources of such failures are(a) type date can represent dates much farther in the future thanthe timestamp types can;(b) timezone rotation might cause a just-in-range timestamp value tobecome a just-out-of-range timestamptz value.Up to now we just ignored these corner-case issues, but now we havean actual user complaint (bug #16657 from Huss EL-Sheikh), so let'sdo something about it.It turns out that commit52ad1e6 already built all the necessaryinfrastructure to support error-free comparisons, but neglected toactually use it in the main-line code paths. Fix that, do a littlebit of code style review, and remove the now-duplicate logic injsonpath_exec.c.Back-patch to v13 where52ad1e6 came in. We could take this backfurther by back-patching said infrastructure, but given the smallnumber of complaints so far, I don't feel a great need to.Discussion:https://postgr.es/m/16657-cde2f876d8cc7971@postgresql.org
1 parent6c05e5b commit3db322e

File tree

7 files changed

+260
-252
lines changed

7 files changed

+260
-252
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp