Re: Making jsonb_agg() faster

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Making jsonb_agg() faster
Дата
Msg-id 617666.1755277022@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Making jsonb_agg() faster  (jian he <jian.universality@gmail.com>)
Ответы Re: Making jsonb_agg() faster
Список pgsql-hackers
jian he <jian.universality@gmail.com> writes:
> outcontext will always be NULL in 0001.
> that means copyScalarSubstructure is never really called.
> it also means that JsonbInState->MemoryContext  was always as NULL in 00001
> maybe we don't need JsonbInState->MemoryContext in 0001
> So 0001 refactoring change would be less invasive.

I think you're missing the point: per the commit message for 0001,

    The real reason for doing it is to provide a mechanism whereby
    pushJsonbValue() can be told to construct the JsonbValue tree
    in a context that is not CurrentMemoryContext.  That happens
    when a non-null "outcontext" is specified in the JsonbInState.
    No callers exercise that option in this patch, but the next
    patch in the series will make use of it.

If we didn't add the outcontext option in this step, we'd just
have to do so in the next one.

            regards, tom lane



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