Re: [PATCH] GROUP BY ALL

From: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, David Christensen <david(at)pgguru(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] GROUP BY ALL
Date: 2024-07-24 11:08:01
Message-ID: 9792FB93-C56F-48A9-9591-BA75B1C28B52@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 24 Jul 2024, at 13:58, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl> wrote:
>
> On Tue, 23 Jul 2024 at 15:22, Andrei Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>> 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.
>
> Personally my number one enhancement would be allowing a trailing
> comma after the last column in the SELECT clause.

Yes, trailing comma sounds great too.

One more similar syntax sugar I can think of. I see lots of queries like
SELECT somtheing
FROM table1
WHERE 1=1
and id = x
--and col1 = val1
and col2 = val2

I was wondering where does that "1=1" comes from. It's because developer comment condition one by one like "--, col1 = val1". And they do not want to cope with and\or continuation.

Best regards, Andrey Borodin.

PS. Seems like Mail.App mangled my previous message despite using plain text. It's totally broken in archives...

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-07-24 11:09:22 Re: PG buildfarm member cisticola
Previous Message Dean Rasheed 2024-07-24 11:07:47 Re: Removing unneeded self joins