Re: SQL/JSON in PostgreSQL
Peter van Hardenberg <pvh@pvh.ca>
From: Peter van Hardenberg <pvh@pvh.ca>
To: "Sven R. Kunze" <srkunze@mail.de>
Cc: Andres Freund <andres@anarazel.de>, Oleg Bartunov <obartunov@gmail.com>, David Steele <david@pgmasters.net>, Pavel Stehule <pavel.stehule@gmail.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>,
Nikita Glukhov <n.gluhov@postgrespro.ru>, Teodor Sigaev <teodor@postgrespro.ru>,
Alexander Korotkov <a.korotkov@postgrespro.ru>, andrew Dunstan <andrew@dunslane.net>
Date: 2017-03-08T19:48:30Z
Lists: pgsql-hackers
Small point of order: YAML is not strictly a super-set of JSON. Editorializing slightly, I have not seen much interest in the world for YAML support though I'd be interested in evidence to the contrary. On Tue, Mar 7, 2017 at 1:43 PM, Sven R. Kunze <srkunze@mail.de> wrote: > Hi, > > about the datetime issue: as far as I know, JSON does not define a > serialization format for dates and timestamps. > > On the other hand, YAML (as a superset of JSON) already supports a > language-independent date(time) serialization format ( > http://yaml.org/type/timestamp.html). > > I haven't had a glance into the SQL/JSON standard yet and a quick search > didn't reveal anything. However, reading your test case here > https://github.com/postgrespro/sqljson/blob/5a8a241/src/ > test/regress/sql/sql_json.sql#L411 it seems as if you intend to parse all > strings in the form of "YYYY-MM-DD" as dates. This is problematic in case a > string happens to look like this but is not intended to be a date. > > Just for the sake of completeness: YAML solves this issue by omitting the > quotation marks around the date string (just as JSON integers have no > quotations marks around them). > > Regards, > Sven > > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers > -- Peter van Hardenberg San Francisco, California "Everything was beautiful, and nothing hurt."—Kurt Vonnegut
Commits
-
SQL/JSON: support the IS JSON predicate
- 6ee30209a6f1 16.0 landed
-
SQL/JSON: add standard JSON constructor functions
- 7081ac46ace8 16.0 landed