| From: | Narayanan Venkateswaran <narayananvpostgres(at)gmail(dot)com> |
|---|---|
| To: | Nitin Motiani <nitinmotiani(at)google(dot)com> |
| Cc: | theshallow27(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
| Subject: | Re: BUG #19737: Empty `JSON_OBJECT` cannot use documented `ON NULL` or unique-key clauses |
| Date: | 2026-10-27 06:51:44 |
| Message-ID: | CAFjuD9e2PLcZJ1i2EUx_+uG=a4Kmb2Kq1KD_=v2cXECrqhpscg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi Nitin,
Thank you once again for the review.
On Wed, Oct 21, 2026 at 2:15 PM Nitin Motiani <nitinmotiani(at)google(dot)com> wrote:
>
> > > I am working on a follow-up patch that addresses json_array also, I
> > > shall submit it soon.
> >
> > Please find attached the patch that fixes the problem in json_array also.
> >
>
> Thanks Narayanan. It seems to work fine. One concern I have is that
> this differs from the SQL standard. Since the documentation is already
> different, this is probably the right fix to make. But the commit
> message and the documentation should reflect this change. What do you
> think?
I agree with your suggestion. While the SQL standard (ISO/IEC 9075-2)
EBNF grammar nests the modifier clauses inside the mandatory expression
bracket, PostgreSQL's documentation has always listed them as independent
optional clauses.
Explicitly acknowledging this difference in the commit message and
clarifying it in the documentation makes sense. I have updated the
commit message to describe this context and added clarifications to
func-json.sgml.
Attached V3 patch covers both JSON_OBJECT and
JSON_ARRAY.
>
> Also can you create a commitfest entry for this?
Great suggestion again ! Done ! https://commitfest.postgresql.org/patch/7527/.
>
> Regards,
> Nitin Motiani
> Google
Thank you,
Narayanan
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Allow-NULL-and-UNIQUE-clauses-in-empty-JSON_OBJEC.patch | application/octet-stream | 9.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Manav Kumar | 2026-10-27 07:15:38 | set_config(‘search_path’) does not truncate names over 63 bytes, unlike SET |
| Previous Message | Hayato Kuroda (Fujitsu) | 2026-10-27 06:42:22 | RE: Streaming decoding fails with "unexpected table_index_fetch_tuple call during logical decoding" when a relation has a TOASTed conbin (follow-up to BUG #18641) |