]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use ereport rather than elog in WinCheckAndInitializeNullTreatment.
authorTatsuo Ishii <ishii@postgresql.org>
Tue, 14 Oct 2025 10:15:24 +0000 (19:15 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Tue, 14 Oct 2025 10:15:24 +0000 (19:15 +0900)
commit5f3808646f67260d5dc0d95f2602886da5cf5c52
tree0c0f6942ea7b4103d204ff04ff991652b425a4b6
parent1206df04c2001868204f3f79c48173065f3b8231
Use ereport rather than elog in WinCheckAndInitializeNullTreatment.

Previously WinCheckAndInitializeNullTreatment() used elog() to emit an
error message. ereport() should be used instead because it's a
user-facing error. Also use existing get_func_name() to get a
function's name, rather than own implementation.

Moreover add an assertion to validate winobj parameter, just like
other window function API.

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Author: Tatsuo Ishii <ishii@postgresql.org>
Reviewed-by: Chao Li <lic@highgo.com>
Discussion: https://postgr.es/m/2952409.1760023154%40sss.pgh.pa.us
src/backend/executor/nodeWindowAgg.c