Re: Further issues with jsonb semantics, documentation - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Further issues with jsonb semantics, documentation
Date
Msg-id 5571DB19.7060705@dunslane.net
Whole thread Raw
In response to Re: Further issues with jsonb semantics, documentation  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Further issues with jsonb semantics, documentation  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 06/04/2015 03:16 PM, Alvaro Herrera wrote:
> I'm just skimming here, but if a jsonb_path type is being proposed,
> perhaps it would be better not to have operators that take text or
> text[] as second argument.  We can provide that functionality with just
> functions.  For example, it will be confusing to have
>
> jsonb 'some json value' - '{foo,bar}'
>
> operate too differently from
>
> jsonb 'some json value' - json_path '{foo,bar}'
>
> And it will be a nasty regression to have 9.5 allow
> jsonb 'some json value' - '{foo,bar}'
> and then have 9.6 error out with "ambiguous operator" when the json_path
> thing is added.
>



The boat has sailed on this. We have had the #> and #>> operators since 
9.3, i.e. even before we got the operators that Peter wants us to adopt 
the usage from, and their right hand operands are text arrays with the 
same path semantics.

'some jsonb value' - '{foo,bar}' is already ambiguous  - the RH operand 
could be a single text datum or a text array.

cheers

andrew



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [CORE] Restore-reliability mode
Next
From: Jim Nasby
Date:
Subject: Re: pg_stat_*_columns?