Re: jsonpath

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Oleg Bartunov <obartunov(at)postgrespro(dot)ru>, Michael Paquier <michael(at)paquier(dot)xyz>, Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, David Steele <david(at)pgmasters(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Subject: Re: jsonpath
Date: 2019-02-24 12:34:22
Message-ID: CAPpHfdu+y1tkiidwu0i=XyGK5eOTOu1fPbuYs=XT32g7tzGd4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 24, 2019 at 2:44 PM Tomas Vondra
<tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
> On 2/24/19 10:03 AM, Alexander Korotkov wrote:
> > Attached is revised version of jsonpath. Assuming that jsonpath have
> > problem places, I decided to propose partial implementation.
> > Following functionality was cut from jsonpath:
> > 1) Support of datetime datatypes. Besides error suppression, this
> > functionality have troubles with timezones. According to standard we
> > should support timezones in jsonpath expressions. But that would
> > prevent jsonpath functions from being immutable, that in turn limits
> > their usage in expression indexes.
>
> Assuming we get the patch committed without the datetime stuff now, what
> does that mean for the future? Does that mean we'll be unable to extend
> it to support datetime in the future, or what? If we define the jsonpath
> functions as immutable now, people may create indexes - which means we
> won't be able to downgrade it to stable later.
>
> So, what's the plan here? The only thing I can think of is having two
> sets of functions - an immutable one, prohibiting datetime expressions,
> and stable that can't be used for indexes etc.

Reasonable question. As I understand, not datetime support itself
making jsonpath functions not immutable, but implicit cast happening
during comparison timestamp vs. timestamptz (and time vs. timetz).
So, in future immutable functions can have limited support of
datetime, where comparison of non-tz vs. tz types is restricted. And
stable versions of functions (for instance, with '_tz' prefix) with
full datetime support.

> > 2) Suppression of numeric errors. I will post it as a separate patch.
> > Pushing this even this partial implementation of jsonpath to PG 12 is
> > still very useful. Also it will simplify a lot pushing other parts of
> > SQL/JSON to future releases.
> >
>
> +1 to push at least partial (but still useful) subset, instead of just
> bumping the patch to PG13

Thank you for support!

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2019-02-24 12:37:09 Re: amcheck verification for GiST
Previous Message Tomas Vondra 2019-02-24 11:44:46 Re: jsonpath