pgsql: Centralize json and jsonb handling of datetime types

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема pgsql: Centralize json and jsonb handling of datetime types
Дата
Msg-id E1ebbbJ-0002QU-Pe@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Centralize json and jsonb handling of datetime types  (Amit Langote <amitlangote09@gmail.com>)
Re: pgsql: Centralize json and jsonb handling of datetime types  (Erik Rijkers <er@xs4all.nl>)
Re: pgsql: Centralize json and jsonb handling of datetime types  (Erik Rijkers <er@xs4all.nl>)
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Remove useless use of bit-masking macros
Следующее
От: Amit Langote
Дата:
Сообщение: Re: pgsql: Centralize json and jsonb handling of datetime types