From: | Andrey Borodin <amborodin86(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | GROUP BY ALL |
Date: | 2022-12-19 04:19:10 |
Message-ID: | CAAhFRxjyTO5BHn9y1oOSEp0TtpTDTTTb7HJBNhTG+i3-hXC0XQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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;
PFA very dummy implementation just for a discussion. I think we can
add all non-aggregating targets.
What do you think?
Best regards, Andrey Borodin.
[0] https://www.linkedin.com/posts/mosha_duckdb-firebolt-snowflake-activity-7009615821006131200-VQ0o/
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Implement-GROUP-BY-ALL.patch | application/octet-stream | 5.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2022-12-19 04:20:55 | Re: (non) translatable string splicing |
Previous Message | Michael Paquier | 2022-12-19 04:06:00 | Re: Add LZ4 compression in pg_dump |