Re: Schizophrenic coding in gin_extract_jsonb(_hash)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Schizophrenic coding in gin_extract_jsonb(_hash)
Дата
Msg-id 30630.1399481962@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Schizophrenic coding in gin_extract_jsonb(_hash)  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> gin_extract_jsonb recursively extracts all the elements, keys and values 
> of any sub-object too, but JB_ROOT_COUNT only counts the top-level elements.

Got it.  So if the top level is empty, we can exit early, but otherwise we
use its length * 2 as a guess at how big the output will be; which will
be right if it's an object without further substructure, and otherwise
might need enlargement.

> (I hope this is made a bit more clear in the comments I added in the 
> patch I posted this morning)

Didn't read that yet, but will incorporate this info into the jsonb_gin
patch I'm working on.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: PGDLLEXPORTing all GUCs?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PGDLLEXPORTing all GUCs?