Re: BUG #19046: Incorrect result when using json_array() with column reference in subquery combined with RIGHT JOIN

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, runyuan(at)berkeley(dot)edu, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19046: Incorrect result when using json_array() with column reference in subquery combined with RIGHT JOIN
Date: 2025-09-16 10:31:49
Message-ID: CAHewXNmcEDPxzzdr1+7S6OPfbvBUvE+kefM1ToJAq9yATsVKTg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Richard Guo <guofenglinux(at)gmail(dot)com> 于2025年9月16日周二 18:18写道:

> On Tue, Sep 16, 2025 at 10:05 AM Richard Guo <guofenglinux(at)gmail(dot)com>
> wrote:
> > There may be other functions that should be treated as non-strict but
> > currently aren't. For now, I suggest we address JsonConstructorExpr
> > first. If we encounter more such cases later, they should be
> > straightforward to fix as well.
>
> I don't like the test cases in the proposed patch. First, the test
> output is excessively large, resulting in a patch with over 30,000
> insertions. I don't think it's a good idea to output the entire tenk1
> table. Second, I don't think it's useful to test json_arrayagg or
> json_objectagg. As I mentioned earlier, these are aggregates, so the
> subquery wouldn't be pulled up in the first place.
>

Thanks a lot!
Your test cases look better.

>
> I've rewritten the test cases, added a commit message, and pushed the
> patch. It has also been back-patched to v16.
>
> - Richard
>

Thanks for pushing.
--
Thanks,
Tender Wang

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Nazneen Jafri 2025-09-16 22:52:23 Read Replica termination occurs when its max_active_replication_origins setting is lower than the primary
Previous Message Richard Guo 2025-09-16 10:18:45 Re: BUG #19046: Incorrect result when using json_array() with column reference in subquery combined with RIGHT JOIN