| From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
|---|---|
| To: | shihao zhong <zhong950419(at)gmail(dot)com> |
| Cc: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org, 303677365(at)qq(dot)com |
| Subject: | Re: BUG #19872: JSON_TABLE: an UNUSED PASSING argument's COLLATE leaks into the output columns (wrong results, persi |
| Date: | 2026-12-03 09:05:20 |
| Message-ID: | CA+HiwqHk-teX+0MzYtaB2ERKao84jo=wX4tt2Bj8ux9GQ-sbSQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Hi,
On Thu, Dec 3, 2026 at 11:45 AM shihao zhong <zhong950419(at)gmail(dot)com> wrote:
>
>
> Hi Zsolt and Jian,
>
> Zsolt, thanks for testing. Those are the cases I had in mind. With v1
> on current master both queries return f and t, the same as master. The
> PASSING cases from the report are still fixed.
>
> Jian, thanks for the v2. With assign_expr_collations() on every part,
> an explicit COLLATE in DEFAULT no longer reaches the result. That is
> what changes those two queries. v1 only takes PASSING out and keeps
> DEFAULT in the result like the branches of a CASE, so I would suggest
> v1.
Yeah, I'd rather not change behavior beyond what's needed to fix the
reported problems in this thread. How a COLLATE in a DEFAULT
expression should affect the result is a fair question, but I think it
deserves its own thread. Jian, thanks for looking into that.
So v1's approach looks right to me. I still need to go through the
patches more carefully and will follow up, but wanted to say that much
now.
--
Thanks, Amit Langote
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Ishjaap Singh | 2026-12-03 08:34:14 | Re: BUG #19835: view with GROUP BY ROLLUP over duplicate columns changes results after dump/restore |