From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Dennis Brouwer <dennis.brouwer@kizitos.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: John Naylor <john.naylor@enterprisedb.com>
Cc: David Micallef <david.j.micallef@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: group by true now errors with non-integer constant in GROUP BY
Date: Thu, 19 Oct 2023 15:18:00 +0200
Message-ID: <3af446dd6fbfdb6e08de95fc24e06081f78a6f15.camel@cybertec.at> (raw)
In-Reply-To: <CAF31W9qz7qXxp=LADZv3+Y1CtJio5cvbU2FcbRyB9nW+R45xQg@mail.gmail.com>
References: <CAJBCwCS7OuEUmGkrnu5Q8SmBP10njnEiX7vJiaxJURZXcCORyw@mail.gmail.com>
<CAFBsxsE_zy1Y=u2ZM6xZHFY2Cwfr_Uii=-irsHtCxrh6GnfBNA@mail.gmail.com>
<837886.1693252560@sss.pgh.pa.us>
<CAF31W9qz7qXxp=LADZv3+Y1CtJio5cvbU2FcbRyB9nW+R45xQg@mail.gmail.com>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: laurenz.albe@cybertec.at, dennis.brouwer@kizitos.com, tgl@sss.pgh.pa.us, john.naylor@enterprisedb.com, david.j.micallef@gmail.com, peter.eisentraut@enterprisedb.com
Subject: Re: group by true now errors with non-integer constant in GROUP BY
In-Reply-To: <3af446dd6fbfdb6e08de95fc24e06081f78a6f15.camel@cybertec.at>
References: <CAJBCwCS7OuEUmGkrnu5Q8SmBP10njnEiX7vJiaxJURZXcCORyw@mail.gmail.com> <CAFBsxsE_zy1Y=u2ZM6xZHFY2Cwfr_Uii=-irsHtCxrh6GnfBNA@mail.gmail.com> <837886.1693252560@sss.pgh.pa.us> <CAF31W9qz7qXxp=LADZv3+Y1CtJio5cvbU2FcbRyB9nW+R45xQg@mail.gmail.com> <3af446dd6fbfdb6e08de95fc24e06081f78a6f15.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox