pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Support for ISO 8601 in the jsonpath .datetime() method 2+ messages / 1 participants [nested] [flat]
* pgsql: Support for ISO 8601 in the jsonpath .datetime() method @ 2020-09-29 09:01 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Alexander Korotkov @ 2020-09-29 09:01 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Support for ISO 8601 in the jsonpath .datetime() method The SQL standard doesn't require jsonpath .datetime() method to support the ISO 8601 format. But our to_json[b]() functions convert timestamps to text in the ISO 8601 format in the sake of compatibility with javascript. So, we add support of the ISO 8601 to the jsonpath .datetime() in the sake compatibility with to_json[b](). The standard mode of datetime parsing currently supports just template patterns and separators in the format string. In order to implement ISO 8601, we have to add support of the format string double quotes to the standard parsing mode. Discussion: https://postgr.es/m/94321be0-cc96-1a81-b6df-796f437f7c66%40postgrespro.ru Author: Nikita Glukhov, revised by me Backpatch-through: 13 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/927d9abb6538e441aa97bb3eea7a15d4cda70715 Modified Files -------------- src/backend/utils/adt/formatting.c | 20 +++++++++++++++++--- src/backend/utils/adt/jsonpath_exec.c | 8 +++++++- src/test/regress/expected/jsonb_jsonpath.out | 19 +++++++++++++++++++ src/test/regress/sql/jsonb_jsonpath.sql | 6 ++++++ 4 files changed, 49 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Support for ISO 8601 in the jsonpath .datetime() method @ 2020-09-29 09:01 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Alexander Korotkov @ 2020-09-29 09:01 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Support for ISO 8601 in the jsonpath .datetime() method The SQL standard doesn't require jsonpath .datetime() method to support the ISO 8601 format. But our to_json[b]() functions convert timestamps to text in the ISO 8601 format in the sake of compatibility with javascript. So, we add support of the ISO 8601 to the jsonpath .datetime() in the sake compatibility with to_json[b](). The standard mode of datetime parsing currently supports just template patterns and separators in the format string. In order to implement ISO 8601, we have to add support of the format string double quotes to the standard parsing mode. Discussion: https://postgr.es/m/94321be0-cc96-1a81-b6df-796f437f7c66%40postgrespro.ru Author: Nikita Glukhov, revised by me Backpatch-through: 13 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/651bdbc811652638e1205440c3181a18feb8f967 Modified Files -------------- src/backend/utils/adt/formatting.c | 20 +++++++++++++++++--- src/backend/utils/adt/jsonpath_exec.c | 8 +++++++- src/test/regress/expected/jsonb_jsonpath.out | 19 +++++++++++++++++++ src/test/regress/sql/jsonb_jsonpath.sql | 6 ++++++ 4 files changed, 49 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-09-29 09:01 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-09-29 09:01 pgsql: Support for ISO 8601 in the jsonpath .datetime() method Alexander Korotkov <akorotkov@postgresql.org> 2020-09-29 09:01 pgsql: Support for ISO 8601 in the jsonpath .datetime() method Alexander Korotkov <akorotkov@postgresql.org>
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