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 55788666.6080108@dunslane.net
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  (Peter Geoghegan <pg@heroku.com>)
Re: Further issues with jsonb semantics, documentation  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 06/05/2015 01:51 PM, Andrew Dunstan wrote:
>
> On 06/05/2015 01:39 PM, Peter Geoghegan wrote:
>> On Thu, Jun 4, 2015 at 12:10 PM, Peter Geoghegan <pg@heroku.com> wrote:
>>>> But I agree that it's not a great contribution to science, 
>>>> especially since
>>>> the index will be applied to the list of elements in the somewhat
>>>> counter-intuitive storage order we use, and we could just raise an 
>>>> error if
>>>> we try to apply integer delete to an object instead of an array.
>>> Cool. Do you want to write a patch, or should I?
>>>
>>> Also, what about negative array subscripting (making the 9.4-era
>>> "operator jsonb -> integer" operator support that for consistency with
>>> the new "operator jsonb - integer" operator)? Should I write the
>>> patch? Will you commit it if I do?
>> Please let me know if you want me to write these two patches.
>>
>
>
> Send the first one, I'm still thinking about the second one.
>


Sorry for the delay on this. I've been mostly off the grid, having an 
all too rare visit from Tom "Mr Enum" Dunstan, and I misunderstood what 
you were suggesting,

Please submit a patch to adjust the treatment of negative integers in 
the old functions to be consistent with their treatment in the new 
functions. i.e. in the range [-n,-1] they should refer to the 
corresponding element counting from the right.

cheers

andrew



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: s_lock() seems too aggressive for machines with many sockets
Next
From: Andrew Dunstan
Date:
Subject: jsonb - path