public inbox for [email protected]
help / color / mirror / Atom feedFrom: Vik Fearing <[email protected]>
To: Andrey Borodin <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Re: GROUP BY ALL
Date: Mon, 19 Dec 2022 17:53:46 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAhFRxjyTO5BHn9y1oOSEp0TtpTDTTTb7HJBNhTG+i3-hXC0XQ@mail.gmail.com>
References: <CAAhFRxjyTO5BHn9y1oOSEp0TtpTDTTTb7HJBNhTG+i3-hXC0XQ@mail.gmail.com>
On 12/19/22 05:19, Andrey Borodin wrote:
> Hi hackers!
>
> I saw a thread in a social network[0] about GROUP BY ALL. The idea seems useful.
> I always was writing something like
> select datname, usename, count(*) from pg_stat_activity group by 1,2;
> and then rewriting to
> select datname, usename, query, count(*) from pg_stat_activity group by 1,2;
> and then "aaahhhh, add a number at the end".
>
> With the proposed feature I can write just
> select datname, usename, count(*) from pg_stat_activity group by all;
We already have GROUP BY ALL, but it doesn't do this.
> PFA very dummy implementation just for a discussion. I think we can
> add all non-aggregating targets.
>
> What do you think?
I think this is a pretty terrible idea. If we want that kind of
behavior, we should just allow the GROUP BY to be omitted since without
grouping sets, it is kind of redundant anyway.
I don't know what my opinion is on that.
--
Vik Fearing
view thread (42+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: GROUP BY ALL
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox