From: | Alexander Korotkov <akorotkov(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Refactor jsonpath's compareDatetime() |
Date: | 2019-10-21 20:11:38 |
Message-ID: | E1iMe1i-00082Y-5W@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/52ad1e659967896ed153185328ffe806d69abcb6
Modified Files
--------------
src/backend/utils/adt/date.c | 40 ++--
src/backend/utils/adt/jsonpath_exec.c | 262 +++++++++++++++++----------
src/backend/utils/adt/timestamp.c | 31 ++--
src/include/utils/date.h | 4 +-
src/include/utils/timestamp.h | 4 +-
src/test/regress/expected/jsonb_jsonpath.out | 37 ++--
src/test/regress/sql/jsonb_jsonpath.sql | 3 +
7 files changed, 237 insertions(+), 144 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2019-10-22 08:05:45 | Re: pgsql: Fix parsing of integer values for connection parameters in libpq |
Previous Message | Tom Lane | 2019-10-21 18:19:30 | pgsql: Deal with yet another issue related to "Norwegian (Bokmål)" loca |