From: Tom Lane <tgl@sss.pgh.pa.us>
To: Venu K <venu2805k@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19826: corr()/regr_r2() of constant input: NULL serially, 1 with partial aggregation
Date: Thu, 12 Nov 2026 12:22:20 -0500
Message-ID: <44951.1794504140@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEYijEimbrZ_FHVBF-iPoasZZHUu0dqm_sG=fgtBuUaBH-7ioA@mail.gmail.com>
References: <19826-4b769cb5342fdfe7@postgresql.org>
<CAEYijEjCz=Sf1Jz9=o1m4zw_KHoj4XVmuXSTynh=2QVW34L1gw@mail.gmail.com>
<1382078.1793675027@sss.pgh.pa.us>
<CAEYijEhJwdF34h=886hbHY=hMLnNimd9hUWi7c-RgO_vGdY2ig@mail.gmail.com>
<3406913.1794428629@sss.pgh.pa.us>
<CAEYijEimbrZ_FHVBF-iPoasZZHUu0dqm_sG=fgtBuUaBH-7ioA@mail.gmail.com>
Venu K <venu2805k@gmail.com> writes:
> On Thu, Nov 12, 2026 at 1:53 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yeah, it seems clear that that test case is just made-up data,
> The first six entries aren't made up: they are the transition states
> for the regr_test rows with x IN (10,20,30) and x IN (80,100), which
> the queries just above print. Only the commonX/commonY entries (7,8
> and 7,9) don't fit those rows, which have distinct X and Y values.
Ah. Now that I think about it, the bogus commonX/commonY entries are
probably my fault: they came in with 649828769, and I was not aware
that the other columns matched some real state, so I just made them
test both the NaN and non-NaN code paths.
> v4 attached: your v3 plus those test changes and a paragraph about
> them in the commit message. make check passes on master (b0496e3)
> with assertions enabled.
v4 seems good, pushed. Thanks for the report and patch!
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, venu2805k@gmail.com
Subject: Re: BUG #19826: corr()/regr_r2() of constant input: NULL serially, 1 with partial aggregation
In-Reply-To: <44951.1794504140@sss.pgh.pa.us>
References: <19826-4b769cb5342fdfe7@postgresql.org> <CAEYijEjCz=Sf1Jz9=o1m4zw_KHoj4XVmuXSTynh=2QVW34L1gw@mail.gmail.com> <1382078.1793675027@sss.pgh.pa.us> <CAEYijEhJwdF34h=886hbHY=hMLnNimd9hUWi7c-RgO_vGdY2ig@mail.gmail.com> <3406913.1794428629@sss.pgh.pa.us> <CAEYijEimbrZ_FHVBF-iPoasZZHUu0dqm_sG=fgtBuUaBH-7ioA@mail.gmail.com> <44951.1794504140@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