Re: first_value()/nth_value() with IGNORE NULLS loop forever (EXCLUDE GROUP/TIES, frame past partition end, no ORDER BY)

From: shihao zhong <zhong950419(at)gmail(dot)com>
To: ishii(at)postgresql(dot)org
Cc: c(dot)bhuvan(at)iitg(dot)ac(dot)in, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: first_value()/nth_value() with IGNORE NULLS loop forever (EXCLUDE GROUP/TIES, frame past partition end, no ORDER BY)
Date: 2026-11-05 00:48:22
Message-ID: CAGRkXqRw1xNgDsCf215VSueLUcvHSyxjhYE=ox5eMpMOv4APtw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Tatsuo,

I think you are right here, sorry for my previous email confused you.

I misread Bhuvan's first mail. I thought row_is_in_frame also needed a fix,
so that it would return -1 for rows after the current row when there is no
ORDER BY.

I rechecked the code and the fix already covered all the cases, I dont
think we need to adjust the test anymore.

Thanks,

Shihao

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2026-11-05 03:41:11 Re: BUG #19695: JSON_VALUE ... RETURNING jsonb returns NULL for later evaluation once one evaluation returns NULL
Previous Message Tatsuo Ishii 2026-11-05 00:19:47 Re: first_value()/nth_value() with IGNORE NULLS loop forever (EXCLUDE GROUP/TIES, frame past partition end, no ORDER BY)