Repository navigation
Commit b52f3db
committed
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: 171 parent 1db7119 commit b52f3db
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
456 | 457 | | |
457 | 458 | | |
458 | 459 | | |
459 | | - | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
| 462 | + | |
| 463 | + | |
466 | 464 | | |
467 | 465 | | |
| 466 | + | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| |||
0 commit comments