[PATCH] GROUP BY ALL

From: David Christensen <david(at)pgguru(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] GROUP BY ALL
Date: 2024-07-22 20:55:20
Message-ID: CAHM0NXjz0kDwtzoe-fnHAqPB1qA8_VJN0XAmCgUZ+iPnvP5LbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I see that there'd been some chatter but not a lot of discussion about
a GROUP BY ALL feature/functionality. There certainly is utility in
such a construct IMHO.

The grammar is unambiguous, so can support this construct in lieu of
the traditional GROUP BY clause. Enclosed is a patch which adds this
via just scanning the TargetEntry list and adding anything that is not
an aggregate function call to the groupList.

Still need some docs; just throwing this out there and getting some feedback.

Thanks,

David

Attachment Content-Type Size
0001-WIP-groupAll-to-automatically-add-columns-to-the-gro.patch application/octet-stream 11.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2024-07-22 20:59:10 Re: Use pgBufferUsage for block reporting in analyze
Previous Message Nathan Bossart 2024-07-22 20:07:10 Re: optimizing pg_upgrade's once-in-each-database steps