public inbox for [email protected]  
help / color / mirror / Atom feed
From: Amit Langote <[email protected]>
To: SATYANARAYANA NARLAPURAM <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: pg_overexplain produces invalid JSON with RANGE_TABLE option
Date: Thu, 16 Apr 2026 14:17:08 +0900
Message-ID: <CA+HiwqGLK2QzHFZcwJ-+CbNy7BFB2=G_Ce0eSfPzCOGg6+=USw@mail.gmail.com> (raw)
In-Reply-To: <CA+HiwqFMboUmHtoGjpLfNAWKitjA4T=jnfca9QrYvoBWrrmY0g@mail.gmail.com>
References: <CAHg+QDdDrdqMr98a_OBYDYmK3RaT7XwCEShZfvDYKZpZTfOEjQ@mail.gmail.com>
	<CA+HiwqFMboUmHtoGjpLfNAWKitjA4T=jnfca9QrYvoBWrrmY0g@mail.gmail.com>

On Thu, Apr 16, 2026 at 9:06 AM Amit Langote <[email protected]> wrote:
> On Thu, Apr 16, 2026 at 6:36 AM SATYANARAYANA NARLAPURAM
> <[email protected]> wrote:
> >
> > Hi Hackers,
> >
> > It appears that pg_overexplain produces invalid JSON output when
> > EXPLAIN (FORMAT JSON, RANGE_TABLE) is used. The "Unprunable RTIs" and
> > "Result RTIs" properties are emitted as key:value pairs directly inside
> > the "Range Table" JSON array, which is structurally invalid.
>
> Thanks for the report and the patch.  That makes sense.
>
> > Attempted to fix this by moving ExplainCloseGroup() before the two overexplain_bitmapset()
> > calls, so the properties are emitted as siblings of "Range Table" in the parent object rather
> > than inside the array.
> >
> > Attached a patch to address this which also includes a test.
>
> I have added a commit message.  Will commit shortly to master and v18.

Pushed.

-- 
Thanks, Amit Langote





view thread (5+ messages)

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: pg_overexplain produces invalid JSON with RANGE_TABLE option
  In-Reply-To: <CA+HiwqGLK2QzHFZcwJ-+CbNy7BFB2=G_Ce0eSfPzCOGg6+=USw@mail.gmail.com>

* 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