<div class="52245733ac3b195ee6f02a3f4f5dbe50ApplePlainTextBody" dir="auto" style="word-wrap:break-word"><br /><br /><blockquote>On 23 Jul 2024, at 00:40, Isaac Morland <<a href="mailto:isaac(dot)morland(at)gmail(dot)com">isaac(dot)morland(at)gmail(dot)com</a>> wrote:<br /><br />odyssey=> select (uw_term).*, count(*) from uw_term group by uw_term;<br />ERROR: column "uw_term.term_id" must appear in the GROUP BY clause or be used in an aggregate function<br />LINE 1: select (uw_term).*, count(*) from uw_term group by uw_term;<br /></blockquote><br /><div>AFAIR this problem was solved in my implementation [0]</div><div><br /></div><div><blockquote>On 23 Jul 2024, at 01:29, Tom Lane <<a href="mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us">tgl(at)sss(dot)pgh(dot)pa(dot)us</a>> wrote:<br /><br />(Personally, I'd wonder exactly what ALL is quantified over: the<br />whole output of the FROM clause, or only columns mentioned in the<br />SELECT tlist, or what? And why that choice rather than another?)<br /></blockquote><br /></div><div>I'd like to have GROUP BY AUTO (I also proposed version GROUP BY SURPRISE ME). But I wouldn't like to open pandora box of syntax sugar extensions which may will be incompatible with future standards.</div><div>If we could have extensible grammar - I'd be happy to have a lot of such enhancements. My top 2 are FROM table SELECT column and better GROUP BY.</div><div><br /></div><div><br /></div><div>Best regards, Andrey Borodin.</div><div><br /></div><div><br /></div><div>[0] <a href="https://www.postgresql.org/message-id/flat/CAAhFRxjyTO5BHn9y1oOSEp0TtpTDTTTb7HJBNhTG%2Bi3-hXC0XQ%40mail.gmail.com">https://www.postgresql.org/message-id/flat/CAAhFRxjyTO5BHn9y1oOSEp0TtpTDTTTb7HJBNhTG%2Bi3-hXC0XQ%40mail.gmail.com</a></div></div>