Re: BUG #19872: JSON_TABLE: an UNUSED PASSING argument's COLLATE leaks into the output columns (wrong results, persi

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: 303677365(at)qq(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19872: JSON_TABLE: an UNUSED PASSING argument's COLLATE leaks into the output columns (wrong results, persi
Date: 2026-11-30 04:57:52
Message-ID: CAGRkXqQ=VpxFyBuwWFy=fKDiqeotO8Lqzp9ot=NkMG-=x8vTMg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Thanks for the clear report. 0001 fixes the FOR ORDINALITY error from
e405a46c45b. I think we should backport it to 17

0002 fixes the leak, which JSON_VALUE() and JSON_QUERY() have too. I
would keep it in master only, because after pg_upgrade some indexes
need a REINDEX and some partitioned tables silently miss rows.

003 are optional tests.

Thanks,
Shihao

Attachment Content-Type Size
v1-0001-JSON_TABLE-don-t-merge-the-collations-of-PASSING-arg.patch application/octet-stream 3.4 KB
v1-0002-Keep-PASSING-arguments-out-of-JSON-query-result-coll.patch application/octet-stream 1.7 KB
v1-0003-Test-collations-of-PASSING-arguments-in-JSON-query-f.patch application/octet-stream 2.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message shihao zhong 2026-11-30 05:02:03 Re: BUG #19824: OMIT QUOTES breaks non-string results: array / composite / array-domain coercions in JSON_QUERY / JS
Previous Message Kirill Reshke 2026-11-30 04:37:11 Re: btree_gist: <-> fails on same-sign infinite intervals