From: | Oleg Bartunov <obartunov(at)gmail(dot)com> |
---|---|
To: | Nico Williams <nico(at)cryptonector(dot)com> |
Cc: | "Sven R(dot) Kunze" <srkunze(at)mail(dot)de>, Magnus Hagander <magnus(at)hagander(dot)net>, Peter van Hardenberg <pvh(at)pvh(dot)ca>, Andres Freund <andres(at)anarazel(dot)de>, David Steele <david(at)pgmasters(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Teodor Sigaev <teodor(at)postgrespro(dot)ru>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: SQL/JSON in PostgreSQL |
Date: | 2017-03-13 10:48:44 |
Message-ID: | CAF4Au4w=64HJo1Vm_gwUNr+jb74cS==2xz9KsZ7X4BPZNXjL=g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 13, 2017 at 9:24 AM, Nico Williams <nico(at)cryptonector(dot)com>
wrote:
> On Thu, Mar 09, 2017 at 07:12:07PM +0100, Sven R. Kunze wrote:
> > From my day-to-day work I can tell, the date(time) type is the only
> missing
> > piece of JSON to make it perfect for business applications (besides,
> maybe,
> > a "currency" type).
>
> And a binary type. And a chunked-string type (to avoid having to escape
> strings). And an interval type. And...
>
Let's first have this basic implementation in postgres, then we'll add
extendability support not only for types, but also for operators.
Right now I see in our regression tests:
select _jsonpath_object(
'["10.03.2017 12:34 +1", "10.03.2017 12:35 +1", "10.03.2017 12:36 +1",
"10.03.2017 12:35 +2", "10.03.2017 12:35 -2"]',
'$[*].datetime("dd.mm.yyyy HH24:MI TZH") ? (@ < "10.03.2017 12:35
+1".datetime("dd.mm.yyyy HH24:MI TZH"))'
);
_jsonpath_object
--------------------------
"2017-03-10 14:34:00+03"
"2017-03-10 13:35:00+03"
(2 rows)
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2017-03-13 11:11:30 | Re: Typo in snapbuild.c |
Previous Message | Artur Zakirov | 2017-03-13 10:48:34 | Re: IF NOT EXISTS option for CREATE SERVER and CREATE USER MAPPING statements |