pgsql: Render infinite date/timestamps as 'infinity' for json/jsonb

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема pgsql: Render infinite date/timestamps as 'infinity' for json/jsonb
Дата
Msg-id E1YR2LP-0003OL-UL@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Render infinite date/timestamps as 'infinity' for json/jsonb

Commit ab14a73a6c raised an error in these cases and later the
behaviour was copied to jsonb. This is what the XML code, which we
then adopted, does, as the XSD types don't accept infinite values.
However, json dates and timestamps are just strings as far as json is
concerned, so there is no reason not to render these values as
'infinity'.

The json portion of this is backpatched to 9.4 where the behaviour was
introduced. The jsonb portion only affects the development branch.

Per gripe on pgsql-general.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/79afe6e66f022ea9cd6c34c334214b2fda870faa

Modified Files
--------------
src/backend/utils/adt/json.c         |   43 +++++++++++++++++-----------------
src/test/regress/expected/json.out   |   24 +++++++++++++++++++
src/test/regress/expected/json_1.out |   24 +++++++++++++++++++
src/test/regress/sql/json.sql        |    6 +++++
4 files changed, 76 insertions(+), 21 deletions(-)


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Render infinite date/timestamps as 'infinity' for json/jsonb
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix table_rewrite event trigger for ALTER TYPE/SET DATA TYPE CAS