From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Christensen <david(at)pgguru(dot)net> |
Cc: | Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] GROUP BY ALL |
Date: | 2025-09-26 20:37:58 |
Message-ID: | 31027.1758919078@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
[ trimming the cc: list because gmail decided my last was spam ]
David Christensen <david(at)pgguru(dot)net> writes:
> Great feedback, thanks; attached is v4 which should address these comments.
I did a pass of cleanup over this --- mostly cosmetic, but not
entirely. Along the way I discovered a pre-existing bug:
transformSelectStmt does
qry->groupDistinct = stmt->groupDistinct;
but transformPLAssignStmt fails to, with the result that GROUP BY
DISTINCT would misbehave if used in a plpgsql "expression" context.
I'm not hugely surprised that no one has reported that from the
field, but nonetheless it's broken. In the attached v5 I just
quickly added the missing line and moved on, but we'll need to
back-patch that bit. (Maybe we'd be well advised to refactor to
reduce the amount of duplicated code that needs to be kept in sync?)
I have not attempted to address the definitional issues I just
queried Peter about. Other open items:
* Documentation
* The test cases deserve reconsideration now that we think their
charter only goes as far as EXPLAIN'ing the results; some of them
seem pretty redundant in this context.
regards, tom lane
Attachment | Content-Type | Size |
---|---|---|
v5-0001-Add-GROUP-BY-ALL.patch | text/x-diff | 14.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Maciek Sakrejda | 2025-09-26 21:01:37 | Re: V18 change on EXPLAIN ANALYZE |
Previous Message | Marcos Pegoraro | 2025-09-26 20:33:26 | V18 change on EXPLAIN ANALYZE |