Re: group by true now errors with non-integer constant in GROUP BY - Mailing list pgsql-bugs

From Laurenz Albe
Subject Re: group by true now errors with non-integer constant in GROUP BY
Date
Msg-id 3af446dd6fbfdb6e08de95fc24e06081f78a6f15.camel@cybertec.at
Whole thread Raw
In response to Re: group by true now errors with non-integer constant in GROUP BY  (Dennis Brouwer <dennis.brouwer@kizitos.com>)
Responses Re: group by true now errors with non-integer constant in GROUP BY  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: group by true now errors with non-integer constant in GROUP BY  (Vik Fearing <vik@postgresfriends.org>)
List pgsql-bugs
On Thu, 2023-10-19 at 14:07 +0200, Dennis Brouwer wrote:
> Hibernate is a widely used framework and this library will compose queries
> (under certain conditions (still unknown to me))
> with GROUP BY coulmn1, column2, true <-- 
>
> Hibernate has been doing this quircky thing for many many years and even
> in the latest release does so. So, potentionally many Java Enterprise
> applications will be tied to postgresql-14 if there is no compatibility
> switch possible. 
>
> In our case a tiny compatability switch would be a livesaver. Of courcse,
> I will try to convince the Hibernate community to have this unnecessary
> constant removed but that still leaves all legacy code to not work with
> postgresql-15+ databases which would be pitiful!

I understand your pain.

But according to my reading of the SQL standard, it only allows for
regular column references in GROUP BY.  Unless I got something wrong,
that would mean the the ball is in Hibernate's court.  It ought to
produce correct SQL.

Yours,
Laurenz Albe



pgsql-bugs by date:

Previous
From: Dennis Brouwer
Date:
Subject: Re: group by true now errors with non-integer constant in GROUP BY
Next
From: "David G. Johnston"
Date:
Subject: Re: group by true now errors with non-integer constant in GROUP BY