| From: | Richard Guo <guofenglinux(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Amit Langote <amitlangote09(at)gmail(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, lukas(dot)eder(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, rmt(at)lists(dot)postgresql(dot)org, Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Melanie Plageman <melanieplageman(at)gmail(dot)com> |
| Subject: | Re: BUG #19418: SQL/JSON JSON_VALUE() does not conform to ISO/IEC 9075-2:2023(E) 6.34 <JSON value constructor> |
| Date: | 2026-04-23 00:55:10 |
| Message-ID: | CAMbWs49ps9eGWvkwc64ytUxdK0s-=xdFjtf64WyGp65EgTZ_LQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Tue, Apr 21, 2026 at 12:20 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
>
> On Tue, Apr 21, 2026 at 11:30 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> > > Another question I'd like to raise: is it OK to commit this patch to
> > > master given that feature freeze has passed? I think the answer is
> > > yes, because this is arguably a bug fix rather than a new feature.
> > > However, it does change user-visible behavior, and existing app code
> > > that relies on the NULL behavior would break. So if we commit it, we
> > > need to add in the release notes about this incompatibility.
>
> > Well, if we definitely intend to commit a compatibility-breaking
> > change, I think it's better to commit it sooner not later. If we
> > wait till v20, all we accomplish is to give users another year to
> > write code that depends on the old behavior.
> >
> > However, usually at this stage of the cycle the answer to such
> > questions is "let the RMT decide". Take the question to them
> > (cc'd).
>
> Thanks Tom for the suggestion.
Not sure the RMT mailing list works or not, maybe I'd better CC RMT
members.
- Richard
> Hi RMT,
>
> I'd like to commit a fix for JSON_ARRAY(subquery) behavior that
> involves a user-visible incompatibility, and would appreciate your
> go/no-go since we're past feature freeze.
>
> Summary:
>
> - JSON_ARRAY(SELECT ...) currently returns NULL over an empty result
> set, but the SQL/JSON standard requires it to return '[]'. Fixing
> this changes user-visible output.
>
> - The same patch also fixes a deparsing issue: views defined with
> JSON_ARRAY(SELECT ...) are dumped back as the internal JSON_ARRAYAGG
> rewrite instead of the original syntax.
>
> - Richard
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Tom Lane | 2026-04-22 22:13:28 | Re: PostgreSQL 17: Bug in libpq when libpq is dlopened/closed multiple times |