From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Centralize json and jsonb handling of datetime types
Date: Wed, 17 Jan 2018 00:29:09 +0000
Message-ID: <E1ebbbJ-0002QU-Pe@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andrew@dunslane.net
Subject: Re: pgsql: Centralize json and jsonb handling of datetime types
In-Reply-To: <E1ebbbJ-0002QU-Pe@gemulon.postgresql.org>
References: <E1ebbbJ-0002QU-Pe@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox