pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tatsuo Ishii <ishii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix Coverity issue reported in commit 2273fa32bce.
Date: Sun, 19 Oct 2025 00:34:47 +0000
Message-ID: <E1vAHNn-002NSS-17@gemulon.postgresql.org> (raw)

Fix Coverity issue reported in commit 2273fa32bce.

Coverity complains that the return value from gettuple_eval_partition
(stored in variable "datum") in a do..while loop in
WinGetFuncArgInPartition is overwritten when exiting the while
loop. This commit tries to fix the issue by changing the
gettuple_eval_partition call to:

(void) gettuple_eval_partition()

explicitly stating that we discard the return value. We are just
interested in whether we are inside or outside of partition, NULL or
NOT NULL here.

Also enhance some comments for easier code reading.

Reported-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/aPCOabSE4VfJLaky%40paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dd766a441d69d16d1c8ab0d3a41a10649702d202

Modified Files
--------------
src/backend/executor/nodeWindowAgg.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)



view thread (2+ messages)

Message-ID: <E1vAHNn-002NSS-17@gemulon.postgresql.org>
Permalink:  ../E1vAHNn-002NSS-17@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vAHNn-002NSS-17@gemulon.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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: ishii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix Coverity issue reported in commit 2273fa32bce.
  In-Reply-To: <E1vAHNn-002NSS-17@gemulon.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