Re: group by true now errors with non-integer constant in GROUP BY
| От | Tom Lane |
|---|---|
| Тема | Re: group by true now errors with non-integer constant in GROUP BY |
| Дата | |
| Msg-id | 3970727.1697828605@sss.pgh.pa.us обсуждение |
| Ответ на | Re: group by true now errors with non-integer constant in GROUP BY (Laurenz Albe <laurenz.albe@cybertec.at>) |
| Список | pgsql-bugs |
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
В списке pgsql-bugs по дате отправления: