public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: jian he <[email protected]>
Cc: [email protected]
Subject: Re: Making jsonb_agg() faster
Date: Fri, 15 Aug 2025 12:57:02 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACJufxHuE-P0s1PxiRja26ZMjKUZiCAgWa1jedswo94SFzjXMg@mail.gmail.com>
References: <[email protected]>
	<CACJufxHuE-P0s1PxiRja26ZMjKUZiCAgWa1jedswo94SFzjXMg@mail.gmail.com>

jian he <[email protected]> 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





view thread (25+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Making jsonb_agg() faster
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox