From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Vik Fearing <vik@postgresfriends.org>
Cc: Dennis Brouwer <dennis.brouwer@kizitos.com>
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: Fri, 20 Oct 2023 15:03:25 -0400
Message-ID: <3970727.1697828605@sss.pgh.pa.us> (raw)
In-Reply-To: <10a3ef130cd6d757690be076a6f47fe9351026d2.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>
<18ba0d29-0637-48c5-a11d-19f8672a8b0f@postgresfriends.org>
<10a3ef130cd6d757690be076a6f47fe9351026d2.camel@cybertec.at>
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> I agree that it is desirable to fix this regression.
It's not a regression. If anything, it's a bug fix, because the
code is now doing what it intended to do all along: reject all
non-integral constants. The previous behavior was exposing an
implementation detail, namely that "true" wasn't a simple literal
constant according to the older grammar. But all of these were
and still are rejected:
GROUP BY 'true';
GROUP BY 1.0;
GROUP BY null;
I'm not really satisfied with concluding that we need to be
bug-compatible (literally) with an old implementation wart forever.
> Still, we shouldn't exonerate Hibernate from fixing the junk SQL
> it produces.
I'm curious as to how this incompatibility escaped notice for a full
year. Does Hibernate emit this SQL only in narrow corner cases?
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, vik@postgresfriends.org, dennis.brouwer@kizitos.com, john.naylor@enterprisedb.com, david.j.micallef@gmail.com, peter.eisentraut@enterprisedb.com, pgsql-bugs@lists.postgresql.org
Subject: Re: group by true now errors with non-integer constant in GROUP BY
In-Reply-To: <3970727.1697828605@sss.pgh.pa.us>
* 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