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

From John Naylor
Subject Re: group by true now errors with non-integer constant in GROUP BY
Date
Msg-id CAFBsxsE_zy1Y=u2ZM6xZHFY2Cwfr_Uii=-irsHtCxrh6GnfBNA@mail.gmail.com
Whole thread Raw
In response to group by true now errors with non-integer constant in GROUP BY  (David Micallef <david.j.micallef@gmail.com>)
Responses Re: group by true now errors with non-integer constant in GROUP BY  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs

On Mon, Aug 28, 2023 at 1:28 PM David Micallef <david.j.micallef@gmail.com> wrote:

> The only error that we have with our pgtap tests with is:
> ERROR:  non-integer constant in GROUP BY
>
> It is only happening to a particular "group by true" that is dynamically compiled when the function parameter asks to group by all data instead of grouping other time series data.

> The issues appears after 15.0

I can confirm the reproducer script fails with commit 941460fcf731a ("Add Boolean node"). (So actually all 15.x were affected.)

The attached fixes it for me (applies onto v15). It looks simple enough, but doesn't comfortably fit so might need some tweaking (needs tests, too).

--
John Naylor
EDB: http://www.enterprisedb.com
Attachment

pgsql-bugs by date:

Previous
From: David Micallef
Date:
Subject: group by true now errors with non-integer constant in GROUP BY
Next
From: Tom Lane
Date:
Subject: Re: group by true now errors with non-integer constant in GROUP BY