| From: | Henson Choi <assam258(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "crprashant(at)hotmail(dot)com" <crprashant(at)hotmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [DEPARSE] Operators on ROW() constructors read back as row comparisons |
| Date: | 2026-10-22 00:58:00 |
| Message-ID: | CAAAe_zC6LmND-ucPrfVEUHb5WbT4w7HSswQLG-YJEiXWanp13w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Tom,
> I'm not too concerned about that, given that the sum total of field
> complaints about this is zero. I doubt very many people are writing
> explicit casts to record, rather than explicit casts to some named
> composite type, and probably even fewer are doing it in this context
> for this purpose.
Understood. Then I'll drop the ruleutils.c change (v2-0004). v3 is
attached:
0001 tests
0002 record the casts the user writes in the parse tree (same as
v2-0002)
0003 show casts of the ROW()s the parser makes itself (same as
v2-0003)
0003 covers a whole-row reference to a JOIN USING alias and a
whole-row reference coerced to an operator's composite input type.
These come up without the user writing any cast, and they do not read
back even for views created now. The path in 0002 does not reach
them, so I kept it separate. If you think these cases need not be
handled, 0003 can be dropped.
The tests are smaller now. Each case creates a view and shows only
its pg_get_viewdef() output, and the objects are left in place so that
the pg_upgrade test dumps and restores them. As Prashant suggested,
there is also a generated column, to show the output of pg_get_expr().
Best regards,
Henson
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Add-tests-for-deparsing-record-comparisons-of-ROW.patch | application/octet-stream | 7.4 KB |
| v3-0002-Record-explicit-casts-of-ROW-constructors-in-the-.patch | application/octet-stream | 5.3 KB |
| v3-0003-Show-casts-of-ROW-constructors-made-by-the-parser.patch | application/octet-stream | 7.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-10-22 01:16:47 | Re: tablecmds: Deadlock caused by Attach Partition |
| Previous Message | Baji Shaik | 2026-10-22 00:55:50 | Re: two small tab-completion patches (ALTER CONSTRAINT, CHECK modifiers) |