pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix incorrect early exit from contain_mutable_functions_walker. 4+ messages / 1 participants [nested] [flat]
* pgsql: Fix incorrect early exit from contain_mutable_functions_walker. @ 2026-11-11 22:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2026-11-11 22:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix incorrect early exit from contain_mutable_functions_walker. Given a JsonExpr.path_spec that is a null constant, contain_mutable_functions_walker immediately returned false, failing to check for other sources of mutability elsewhere in the JsonExpr. It must only skip the jspIsMutable() test in this case. While here, remove a couple of redundant castNode calls (I'm not a fan of using that directly after an explicit IsA check). Bug: #19840 Reported-by: chunling qin <303677365@qq.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19840-7d5243be84d7ecd3@postgresql.org Backpatch-through: 17 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b52f3db885db1a8d8723f32db2ff35ea02ca6044 Modified Files -------------- src/backend/optimizer/util/clauses.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix incorrect early exit from contain_mutable_functions_walker. @ 2026-11-11 22:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2026-11-11 22:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix incorrect early exit from contain_mutable_functions_walker. Given a JsonExpr.path_spec that is a null constant, contain_mutable_functions_walker immediately returned false, failing to check for other sources of mutability elsewhere in the JsonExpr. It must only skip the jspIsMutable() test in this case. While here, remove a couple of redundant castNode calls (I'm not a fan of using that directly after an explicit IsA check). Bug: #19840 Reported-by: chunling qin <303677365@qq.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19840-7d5243be84d7ecd3@postgresql.org Backpatch-through: 17 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/51ae11c51699ba6bc69c793485cffdd693e2b735 Modified Files -------------- src/backend/optimizer/util/clauses.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix incorrect early exit from contain_mutable_functions_walker. @ 2026-11-11 22:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2026-11-11 22:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix incorrect early exit from contain_mutable_functions_walker. Given a JsonExpr.path_spec that is a null constant, contain_mutable_functions_walker immediately returned false, failing to check for other sources of mutability elsewhere in the JsonExpr. It must only skip the jspIsMutable() test in this case. While here, remove a couple of redundant castNode calls (I'm not a fan of using that directly after an explicit IsA check). Bug: #19840 Reported-by: chunling qin <303677365@qq.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19840-7d5243be84d7ecd3@postgresql.org Backpatch-through: 17 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/69bccbbaef0a4868b409c07444ed10e1193c4d4a Modified Files -------------- src/backend/optimizer/util/clauses.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Fix incorrect early exit from contain_mutable_functions_walker. @ 2026-11-11 22:45 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2026-11-11 22:45 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix incorrect early exit from contain_mutable_functions_walker. Given a JsonExpr.path_spec that is a null constant, contain_mutable_functions_walker immediately returned false, failing to check for other sources of mutability elsewhere in the JsonExpr. It must only skip the jspIsMutable() test in this case. While here, remove a couple of redundant castNode calls (I'm not a fan of using that directly after an explicit IsA check). Bug: #19840 Reported-by: chunling qin <303677365@qq.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/19840-7d5243be84d7ecd3@postgresql.org Backpatch-through: 17 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c1694b7b962c8b8031bc115bfca2f21e7a156654 Modified Files -------------- src/backend/optimizer/util/clauses.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-11-11 22:45 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-11-11 22:45 pgsql: Fix incorrect early exit from contain_mutable_functions_walker. Tom Lane <tgl@sss.pgh.pa.us> 2026-11-11 22:45 pgsql: Fix incorrect early exit from contain_mutable_functions_walker. Tom Lane <tgl@sss.pgh.pa.us> 2026-11-11 22:45 pgsql: Fix incorrect early exit from contain_mutable_functions_walker. Tom Lane <tgl@sss.pgh.pa.us> 2026-11-11 22:45 pgsql: Fix incorrect early exit from contain_mutable_functions_walker. Tom Lane <tgl@sss.pgh.pa.us>
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