From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Centralize json and jsonb handling of datetime types |
Date: | 2018-01-17 00:29:09 |
Message-ID: | E1ebbbJ-0002QU-Pe@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Centralize json and jsonb handling of datetime types
The creates a single function JsonEncodeDateTime which will format these
data types in an efficient and consistent manner. This will be all the
more important when we come to jsonpath so we don't have to implement yet
more code doing the same thing in two more places.
This also extends the code to handle time and timetz types which were
not previously handled specially. This requires exposing the time2tm and
timetz2tm functions.
Patch from Nikita Glukhov
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cc4feded0a31d2b732d4ea68613115cb720e624e
Modified Files
--------------
src/backend/utils/adt/date.c | 6 +--
src/backend/utils/adt/json.c | 122 ++++++++++++++++++++++++++++++++----------
src/backend/utils/adt/jsonb.c | 70 ++++--------------------
src/include/utils/date.h | 4 +-
src/include/utils/jsonapi.h | 2 +
5 files changed, 109 insertions(+), 95 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2018-01-17 05:34:52 | Re: pgsql: Centralize json and jsonb handling of datetime types |
Previous Message | Peter Eisentraut | 2018-01-16 23:11:19 | pgsql: Remove useless use of bit-masking macros |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2018-01-17 03:32:16 | Re: [Sender Address Forgery]Re: [Sender Address Forgery]Re: [HACKERS] path toward faster partition pruning |
Previous Message | Michael Paquier | 2018-01-17 00:28:11 | Re: let's not complain about harmless patch-apply failures |