Re: jsonb array-style subscripting - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: jsonb array-style subscripting
Date
Msg-id 55D6297D.3090903@BlueTreble.com
Whole thread Raw
In response to Re: jsonb array-style subscripting  (Josh Berkus <josh@agliodbs.com>)
Responses Re: jsonb array-style subscripting  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 8/17/15 4:25 PM, Josh Berkus wrote:
> On 08/17/2015 02:18 PM, Jim Nasby wrote:
>> >On 8/17/15 3:33 PM, Josh Berkus wrote:
>>> >>Again, how do we handle missing keys?  Just return NULL?  or ERROR?  I'd
>>> >>prefer the former, but there will be arguments the other way.
>> >
>> >I've been wondering if we should add some kind of "strict" JSON. My big
>> >concern is throwing an error if you try to provide duplicate keys, but
>> >it seems reasonable that json_strict would throw an error if you try to
>> >reference something that doesn't exist.
> Only if there's demand for it.  Is there?

I'm certainly worried (paranoid?) about it. Postgres is very good about 
not silently dropping data and this seems a glaring departure from that. 
I haven't looked yet but I'm hoping this could at least be added as an 
extension without duplicating a bunch of the existing JSON stuff.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: proposal: function parse_ident
Next
From: Feng Tian
Date:
Subject: Re: Using quicksort for every external sort run