pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Render infinite date/timestamps as 'infinity' for json/jsonb 2+ messages / 1 participants [nested] [flat]
* pgsql: Render infinite date/timestamps as 'infinity' for json/jsonb @ 2015-02-26 17:35 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 2+ messages in thread From: Andrew Dunstan @ 2015-02-26 17:35 UTC (permalink / raw) To: 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 ------ master Details ------- http://git.postgresql.org/pg/commitdiff/bda76c1c8cfb1d11751ba6be88f0242850481733 Modified Files -------------- src/backend/utils/adt/json.c | 43 +++++++++++------------ src/backend/utils/adt/jsonb.c | 61 ++++++++++++++++++--------------- src/test/regress/expected/json.out | 24 +++++++++++++ src/test/regress/expected/json_1.out | 24 +++++++++++++ src/test/regress/expected/jsonb.out | 24 +++++++++++++ src/test/regress/expected/jsonb_1.out | 24 +++++++++++++ src/test/regress/sql/json.sql | 6 ++++ src/test/regress/sql/jsonb.sql | 6 ++++ 8 files changed, 164 insertions(+), 48 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Render infinite date/timestamps as 'infinity' for json/jsonb @ 2015-02-26 17:35 Andrew Dunstan <andrew@dunslane.net> 0 siblings, 0 replies; 2+ messages in thread From: Andrew Dunstan @ 2015-02-26 17:35 UTC (permalink / raw) To: 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(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-02-26 17:35 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-02-26 17:35 pgsql: Render infinite date/timestamps as 'infinity' for json/jsonb Andrew Dunstan <andrew@dunslane.net> 2015-02-26 17:35 pgsql: Render infinite date/timestamps as 'infinity' for json/jsonb Andrew Dunstan <andrew@dunslane.net>
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