Re: group by true now errors with non-integer constant in GROUP BY

From: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
To: David Micallef <david(dot)j(dot)micallef(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: group by true now errors with non-integer constant in GROUP BY
Date: 2023-08-28 09:24:32
Message-ID: CAFBsxsE_zy1Y=u2ZM6xZHFY2Cwfr_Uii=-irsHtCxrh6GnfBNA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Aug 28, 2023 at 1:28 PM David Micallef <david(dot)j(dot)micallef(at)gmail(dot)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 Content-Type Size
fix-group-by-bool.patch text/x-patch 583 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-08-28 19:56:00 Re: group by true now errors with non-integer constant in GROUP BY
Previous Message David Micallef 2023-08-28 06:27:58 group by true now errors with non-integer constant in GROUP BY