Re: BUG #19824: OMIT QUOTES breaks non-string results: array / composite / array-domain coercions in JSON_QUERY / JS

From: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
To: shihao zhong <zhong950419(at)gmail(dot)com>
Cc: 303677365(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Amit Langote <amitlangote09(at)gmail(dot)com>
Subject: Re: BUG #19824: OMIT QUOTES breaks non-string results: array / composite / array-domain coercions in JSON_QUERY / JS
Date: 2026-11-30 05:45:21
Message-ID: CAJTYsWWHq_d=ZeUb78pSq4ftkfG4_sLd2ruZQOJvuyzajBKBHQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On Mon, 30 Nov 2026 at 10:32, shihao zhong <zhong950419(at)gmail(dot)com> wrote:
>
> Hi ChunLing,
>
> Thanks for your report, I can reproduce it, With OMIT
> QUOTES, json_populate_type() turns arrays and objects into text too.

+1

> The attached patch only strips quotes when the jsonb value is a
> scalar, so arrays and objects take the same path as KEEP QUOTES.

Thanks for the patch, lgtm.

The commit message could mention JSON_TABLE, and AFAICS this
should be backpatched to 17.

Regards,
Ayush

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message shihao zhong 2026-11-30 05:35:59 Re: BUG #19873: planner silently drops the second ORDER BY sort key when both keys reference the same expression und