Re: nodeWindowAgg.c IGNORE NULLS abs overflow

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: jian(dot)universality(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: nodeWindowAgg.c IGNORE NULLS abs overflow
Date: 2026-11-05 04:18:09
Message-ID: 20261105.131809.1828869479538898160.ishii@postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jian,

> I confirmed the problem. It seems it's a corner case bug: only happens
> when offset = -2147483648. Anyway, bug is a bug.
>
> Attached is a patch which should be ready for commit IMO. I haven't
> changed the C code part from yours. I have changed the regression test
> part to use low case SQL statements which fits in better with
> surroundings.

Attached is the v2 patch. I just added a test case for lag() to
clarify that it is affected by the bug too. If there's no objection,
I will push it to master and 19 branches.

Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

Attachment Content-Type Size
v2-0001-Fix-wrong-results-of-some-window-functions-with-I.patch text/x-patch 5.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Koshi Shibagaki (Fujitsu) 2026-11-05 03:52:09 Re: [PATCH] Refactor pgbench to make future improvements easier