Fix misuse use of window_gettupleslot function (src/backend/executor/nodeWindowAgg.c)

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Fix misuse use of window_gettupleslot function (src/backend/executor/nodeWindowAgg.c)
Date: 2025-10-05 13:23:58
Message-ID: CAEudQArGABt_KKhZiwcKD1gYs3AzburecdoVK7hGUjqa7xqrFQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi.

Per Coverity.

CID 1635309: (#1 of 1): Unchecked return value (CHECKED_RETURN)
7. check_return: Calling window_gettupleslot without checking return value
(as is done elsewhere 8 out of 9 times).

The function "window_gettupleslot" can fail.

All other calls check the return, In this case it could not be different.

Fix by checking the return and reporting a message to the user,
in case of failure.
The error message, however, I'm not sure if it's ideal.

best regards,
Ranier Vilela

Attachment Content-Type Size
fix-api-misuse-function-window_gettupleslot.patch application/octet-stream 626 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2025-10-05 14:18:53 Re: log_min_messages per backend type
Previous Message Jim Jones 2025-10-05 10:02:10 Re: We broke the defense against accessing other sessions' temp tables