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

From Tom Lane
Subject Re: Further issues with jsonb semantics, documentation
Date
Msg-id 27632.1433537297@sss.pgh.pa.us
Whole thread Raw
In response to Re: Further issues with jsonb semantics, documentation  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Further issues with jsonb semantics, documentation  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Yeah, Good point. Actually, if my memory serves me correctly (always a 
> dubious bet), the avoidance of that kind of ambiguity is why we 
> introduced the #> and #>> operators in the first place, after going 
> round and round for a while on what the API would look like. I should 
> have remembered that when this came around. Mea culpa.

> So probably the least invasive change would be to rename the text[] 
> variant operator to something like "#-" and rename the corresponding 
> function to jsonb_delete_path.

Not sure that's a great choice of operator name; consider for exampleselect 4#-1;
It's not immediately obvious whether the "-" is meant as a separate
unary minus.  There are heuristics in the lexer that try to deal with
cases like this, but it doesn't seem like a good plan to double down
on such heuristics always doing the right thing.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] 9.4.1 -> 9.4.2 problem: could not access status of transaction 1