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

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: 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:02:03
Message-ID: CAGRkXqSJvh7_CnOAi2N=3FdCmXmEgYhwN-uo21mW8fk5_=m6mg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi ChunLing,

Thanks for your report, I can reproduce it, With OMIT
QUOTES, json_populate_type() turns arrays and objects into text too.

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,
Shihao

Attachment Content-Type Size
v1-0001-Fix-OMIT-QUOTES-being-applied-to-arrays-and-objec.patch application/octet-stream 3.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message shihao zhong 2026-11-30 05:05:35 Re: BUG #19870: WinGetFuncArgInPartition(..., WINDOW_SEEK_TAIL, ...) returns wrong rows under IGNORE NULLS
Previous Message shihao zhong 2026-11-30 04:57:52 Re: BUG #19872: JSON_TABLE: an UNUSED PASSING argument's COLLATE leaks into the output columns (wrong results, persi