Re: Wrong results with grouping sets

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Wrong results with grouping sets
Date: 2024-07-06 02:06:48
Message-ID: CAMbWs49Jpn3_cRtTAHbiNrRcN0t4tDTvSp7CdaSX_sxg29SKZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 5, 2024 at 5:51 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2024-07-01 16:29:16 +0800, Richard Guo wrote:
> > Here is an updated version of this patchset. I've run pgindent for it,
> > and also tweaked the commit messages a bit.
> >
> > In principle, 0001 can be backpatched to all supported versions to fix
> > the cases where there are subqueries in the grouping expressions; 0002
> > can be backpatched to 16 where we have the nullingrels stuff. But both
> > patches seem to be quite invasive. I'm not sure if we want to backpatch
> > them to stable branches. Any thoughts about backpatching?
>
> As-is they can't be backpatched, unless I am missing something? Afaict they
> introduce rather thorough ABI breaks? And API breaks, actually?

Indeed, you're correct. I did not think about this. This patchset
modifies certain struct definitions in src/include/ and also changes
the signature of several functions, resulting in definite ABI and API
breaks.

BTW, from catversion.h I read:

* Another common reason for a catversion update is a change in parsetree
* external representation, since serialized parsetrees appear in stored
* rules and new-style SQL functions. Almost any change in primnodes.h or
* parsenodes.h will warrant a catversion update.

Since this patchset changes the querytree produced by the parser, does
this indicate that a catversion bump is needed?

Thanks
Richard

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2024-07-06 02:23:35 Re: Changing the state of data checksums in a running cluster
Previous Message David Rowley 2024-07-06 02:05:46 Re: Use generation memory context for tuplestore.c