From: | David Christensen <david(at)pgguru(dot)net> |
---|---|
To: | Andrei Borodin <x4mmm(at)yandex-team(dot)ru> |
Cc: | Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] GROUP BY ALL |
Date: | 2024-07-23 13:39:20 |
Message-ID: | CAHM0NXgEaBJ_7mY8pT7Gb9mTMdyN4jUoyB4ssXC4oSLF8qWmpA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jul 23, 2024 at 8:21 AM Andrei Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>
> On 23 Jul 2024, at 00:40, Isaac Morland <isaac(dot)morland(at)gmail(dot)com> wrote:
>
> odyssey=> select (uw_term).*, count(*) from uw_term group by uw_term;
> ERROR: column "uw_term.term_id" must appear in the GROUP BY clause or be used in an aggregate function
> LINE 1: select (uw_term).*, count(*) from uw_term group by uw_term;
>
>
> AFAIR this problem was solved in my implementation [0]
>
> On 23 Jul 2024, at 01:29, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> (Personally, I'd wonder exactly what ALL is quantified over: the
> whole output of the FROM clause, or only columns mentioned in the
> SELECT tlist, or what? And why that choice rather than another?)
>
>
> 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.
> 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.
GROUP BY AUTO also seems fine here to me; I understand the desire to
avoid major incompatible syntax changes; GROUP BY ALL does exist in
multiple products so it's not unprecedented.
I wrote my patch before seeing your thread, sorry I missed that. :-)
David
From | Date | Subject | |
---|---|---|---|
Next Message | David Christensen | 2024-07-23 13:42:07 | Re: [PATCH] GROUP BY ALL |
Previous Message | David Christensen | 2024-07-23 13:37:02 | Re: [PATCH] GROUP BY ALL |