Re: Duplicate JSON Object Keys

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Duplicate JSON Object Keys
Дата
Msg-id 513A815F.8050500@dunslane.net
обсуждение исходный текст
Ответ на Re: Duplicate JSON Object Keys  (Hannu Krosing <hannu@krosing.net>)
Список 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 по дате отправления:

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: Duplicate JSON Object Keys
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Index Unqiueness