Re: Duplicate JSON Object Keys - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Duplicate JSON Object Keys
Date
Msg-id 513A815F.8050500@dunslane.net
Whole thread Raw
In response to Re: Duplicate JSON Object Keys  (Hannu Krosing <hannu@krosing.net>)
List pgsql-hackers
On 03/08/2013 06:37 PM, Hannu Krosing wrote:

>
> I suspect that 99.98% of the time we will get valid and unique JS 
> Object serializations or equivalent as input to json_in()
>
> If we want the getter functions to handle the "loose JSON" to Object 
> conversion
> side  assuming our stored JSON can contain non-unique keys then these are
> bound to be slower, as they have to do these checks. Thay can't just 
> grab the first
> matching one and return or recurse on that.


No, there will be no slowdown. The parser doesn't short circuit.

Read the code.

cheers

andrew



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Duplicate JSON Object Keys
Next
From: Bruce Momjian
Date:
Subject: Re: Index Unqiueness