Refactor jsonpath's compareDatetime()
Alexander Korotkov <akorotkov@postgresql.org>
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
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/date.c | modified | +24 −16 |
| src/backend/utils/adt/jsonpath_exec.c | modified | +167 −95 |
| src/backend/utils/adt/timestamp.c | modified | +17 −14 |
| src/include/utils/date.h | modified | +2 −2 |
| src/include/utils/timestamp.h | modified | +2 −2 |
| src/test/regress/expected/jsonb_jsonpath.out | modified | +22 −15 |
| src/test/regress/sql/jsonb_jsonpath.sql | modified | +3 −0 |
Discussion
- Re: pgsql: Implement jsonpath .datetime() method 9 messages · 2019-09-27 → 2019-10-19
Cited messages not in the archive:
32308.1569455803@sss.pgh.pa.us