pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tatsuo Ishii <ishii@postgresql.org>
To: zhong950419@gmail.com
Cc: c.bhuvan@iitg.ac.in
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: first_value()/nth_value() with IGNORE NULLS loop forever (EXCLUDE GROUP/TIES, frame past partition end, no ORDER BY)
Date: Wed, 04 Nov 2026 16:44:15 +0900 (JST)
Message-ID: <20261104.164415.1303787863463904189.ishii@postgresql.org> (raw)
In-Reply-To: <CAGRkXqTAxzwW+3bp4JjZdSBizRTOOnxtpshZSWOudMtwHGU=iw@mail.gmail.com>
References: <PN0P287MB09038F3BD9921EBACF5646F6A7632@PN0P287MB0903.INDP287.PROD.OUTLOOK.COM>
	<20261024.165148.796213861837098561.ishii@postgresql.org>
	<CAGRkXqTAxzwW+3bp4JjZdSBizRTOOnxtpshZSWOudMtwHGU=iw@mail.gmail.com>

Hi Shihao,

> Hi Bhuvan,
> 
> Thanks for the report and the patch. I can reproduce all five queries
> on master and on 19rc1.
> 
> This came in with 25a30bbd423. I think it belongs on the 19 open items.
> 
> https://wiki.postgresql.org/wiki/PostgreSQL_19_Open_Items

Yeah, I have just added this to the 19 open items.

> With your patch all five return at once and the regression tests
> pass. I also compared the three functions against array_agg(x) FILTER
> (WHERE x IS NOT NULL) over about 11k frame combinations. That included
> spill to disk and volatile arguments. No differences.
> 
> One suggestion for the test. Could you add last_value IGNORE NULLS
> with EXCLUDE TIES and no ORDER BY? It scans backward, so it would
> catch a later fix in row_is_in_frame that returns -1 for every
> position after the current row.

I have just started to read the discussion and patches. Just to
clarify, is the test for feature improvement of row_is_in_frame?

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






view thread (17+ messages)  latest in thread

Message-ID: <20261104.164415.1303787863463904189.ishii@postgresql.org>
Permalink:  ../20261104.164415.1303787863463904189.ishii@postgresql.org/
Also on:    postgresql.org/message-id/20261104.164415.1303787863463904189.ishii@postgresql.org

 · 

reply

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: ishii@postgresql.org, zhong950419@gmail.com, c.bhuvan@iitg.ac.in
  Subject: Re: first_value()/nth_value() with IGNORE NULLS loop forever (EXCLUDE GROUP/TIES, frame past partition end, no ORDER BY)
  In-Reply-To: <20261104.164415.1303787863463904189.ishii@postgresql.org>
  References: <PN0P287MB09038F3BD9921EBACF5646F6A7632@PN0P287MB0903.INDP287.PROD.OUTLOOK.COM> <20261024.165148.796213861837098561.ishii@postgresql.org> <CAGRkXqTAxzwW+3bp4JjZdSBizRTOOnxtpshZSWOudMtwHGU=iw@mail.gmail.com> <20261104.164415.1303787863463904189.ishii@postgresql.org>

* 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