Refactor jsonpath's compareDatetime()

Alexander Korotkov <akorotkov@postgresql.org>

Commit: 52ad1e659967896ed153185328ffe806d69abcb6
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: 2019-10-21T20:07:07Z
Releases: 13.0
Refactor jsonpath's compareDatetime()

This commit refactors come ridiculous coding in compareDatetime().  Also, it
provides correct cross-datatype comparison even when one of values overflows
during cast.  That eliminates dilemma on whether we should suppress overflow
errors during cast.

Reported-by: Tom Lane
Discussion: https://postgr.es/m/32308.1569455803%40sss.pgh.pa.us
Discussion: https://postgr.es/m/a5629d0c-8162-7559-16aa-0c8390d6ba5f%40postgrespro.ru
Author: Nikita Glukhov, Alexander Korotkov

Files

Discussion

Cited messages not in the archive: 32308.1569455803@sss.pgh.pa.us