pgsql: Fix incorrect early exit from contain_mutable_functions_walker.
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: /messages/by-id/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(-)