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: Robert Haas <robertmhaas@gmail.com>, 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-09T18:50:55Z
Lists: pgsql-hackers
Anecdotally, we just stored dates as strings and used a convention (key ends in "_at", I believe) to interpret them. The lack of support for dates in JSON is well-known, universally decried... and not a problem the PostgreSQL community can fix. On Thu, Mar 9, 2017 at 10:24 AM, Sven R. Kunze <srkunze@mail.de> wrote: > On 09.03.2017 18:58, Robert Haas wrote: > >> Also, even if the superset thing were true on a theoretical plane, I'm >> not sure it would do us much good in practice. If we start using >> YAML-specific constructs, we won't have valid JSON any more. If we >> use only things that are legal in JSON, YAML's irrelevant. >> > > That's true. I just wanted to share my view of the "date guessing" part of > pgpro's commits. > I don't have a good solution for it either, I can only tell that where I > work we do have same issues: either we guess by looking at the string value > or we know that "this particular key" must be a date. > Unsatisfied with either solution, we tend to use YAML for our APIs if > possible. > > > 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