| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | nodeWindowAgg.c IGNORE NULLS abs overflow |
| Date: | 2026-10-21 04:12:41 |
| Message-ID: | CACJufxH2_4ucJ58_YQPin8E8hf2RRD6S7rA-UK9pSWxdg7YBQw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi.
SELECT v,
lead(v, -2147483648) OVER w AS respect_nulls,
lead(v, -2147483648) IGNORE NULLS OVER w AS ignore_nulls
FROM (VALUES (1), (2)) AS t(v)
WINDOW w AS (ORDER BY v);
should return all NULL values for column ignore_nulls.
The fix is to replace the abs function in nodeWindowAgg.c with pg_abs_s32.
| Attachment | Content-Type | Size |
|---|---|---|
| fix_abs_overflow_nodeWindowAgg.c.diff | text/x-patch | 2.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sho Ito | 2026-10-21 05:12:12 | Re: [PATCH v1] Fix tab completion for DROP INDEX CONCURRENTLY |
| Previous Message | Trakshan Mishra | 2026-10-21 03:44:41 | Re: Re: [PATCH] Fix segmentation fault caused by reentrancy in RI_Fkey_cascade_del (ri_triggers.c) |