forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb6e1157
committed
Don't include CaseTestExpr in JsonValueExpr.formatted_expr
A CaseTestExpr is currently being put intoJsonValueExpr.formatted_expr as placeholder for the result ofevaluating JsonValueExpr.raw_expr, which in turn is evaluatedseparately. Though, there's no need for this indirection ifraw_expr itself can be embedded into formatted_expr and evaluatedas part of evaluating the latter, especially as there is nospecial reason to evaluate it separately. So this commit makes itso. As a result, JsonValueExpr.raw_expr no longer needs to beevaluated in ExecInterpExpr(), eval_const_exprs_mutator() etc. andis now only used for displaying the original "unformatted"expression in ruleutils.c.While at it, this also removes the function makeCaseTestExpr(),because the code in makeJsonConstructorExpr() looks more readablewithout it IMO and isn't used by anyone else either.Finally, a note is added in the comment above CaseTestExpr'sdefinition that JsonConstructorExpr is also using it.Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://postgr.es/m/CA+HiwqE4XTdfb1nW=Ojoy_tQSRhYt-q_kb6i5d4xcKyrLC1Nbg@mail.gmail.com1 parent785480c commitb6e1157
File tree
5 files changed
+39
-55
lines changed- src
- backend
- executor
- nodes
- optimizer/util
- parser
- include/nodes
5 files changed
+39
-55
lines changedLines changed: 2 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2294 | 2294 |
| |
2295 | 2295 |
| |
2296 | 2296 |
| |
2297 |
| - | |
2298 |
| - | |
2299 |
| - | |
2300 |
| - | |
2301 |
| - | |
2302 |
| - | |
2303 |
| - | |
2304 |
| - | |
2305 |
| - | |
2306 |
| - | |
2307 |
| - | |
2308 |
| - | |
2309 |
| - | |
2310 |
| - | |
2311 |
| - | |
| 2297 | + | |
| 2298 | + | |
2312 | 2299 |
| |
2313 | 2300 |
| |
2314 | 2301 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
853 | 853 |
| |
854 | 854 |
| |
855 | 855 |
| |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
856 | 860 |
| |
857 | 861 |
| |
858 | 862 |
| |
|
Lines changed: 5 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2827 | 2827 |
| |
2828 | 2828 |
| |
2829 | 2829 |
| |
2830 |
| - | |
| 2830 | + | |
2831 | 2831 |
| |
2832 |
| - | |
2833 |
| - | |
2834 |
| - | |
2835 |
| - | |
2836 |
| - | |
2837 |
| - | |
2838 |
| - | |
2839 |
| - | |
2840 |
| - | |
2841 |
| - | |
2842 |
| - | |
2843 |
| - | |
2844 |
| - | |
2845 |
| - | |
2846 |
| - | |
2847 |
| - | |
2848 |
| - | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
2849 | 2836 |
| |
2850 | 2837 |
| |
2851 | 2838 |
| |
|
Lines changed: 22 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3202 | 3202 |
| |
3203 | 3203 |
| |
3204 | 3204 |
| |
3205 |
| - | |
3206 |
| - | |
3207 |
| - | |
3208 |
| - | |
3209 |
| - | |
3210 |
| - | |
3211 |
| - | |
3212 |
| - | |
3213 |
| - | |
3214 |
| - | |
3215 |
| - | |
3216 |
| - | |
3217 |
| - | |
3218 |
| - | |
3219 |
| - | |
3220 | 3205 |
| |
3221 | 3206 |
| |
3222 | 3207 |
| |
| |||
3268 | 3253 |
| |
3269 | 3254 |
| |
3270 | 3255 |
| |
3271 |
| - | |
3272 | 3256 |
| |
3273 | 3257 |
| |
3274 |
| - | |
3275 |
| - | |
3276 | 3258 |
| |
3277 | 3259 |
| |
3278 | 3260 |
| |
| |||
3310 | 3292 |
| |
3311 | 3293 |
| |
3312 | 3294 |
| |
3313 |
| - | |
| 3295 | + | |
3314 | 3296 |
| |
3315 | 3297 |
| |
3316 | 3298 |
| |
| |||
3537 | 3519 |
| |
3538 | 3520 |
| |
3539 | 3521 |
| |
| 3522 | + | |
| 3523 | + | |
| 3524 | + | |
| 3525 | + | |
| 3526 | + | |
| 3527 | + | |
3540 | 3528 |
| |
3541 |
| - | |
| 3529 | + | |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
| 3536 | + | |
| 3537 | + | |
3542 | 3538 |
| |
3543 | 3539 |
| |
3544 | 3540 |
| |
| |||
3636 | 3632 |
| |
3637 | 3633 |
| |
3638 | 3634 |
| |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
3639 | 3640 |
| |
3640 | 3641 |
| |
3641 | 3642 |
| |
| |||
3900 | 3901 |
| |
3901 | 3902 |
| |
3902 | 3903 |
| |
3903 |
| - | |
| 3904 | + | |
3904 | 3905 |
| |
3905 | 3906 |
| |
3906 | 3907 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1264 | 1264 |
| |
1265 | 1265 |
| |
1266 | 1266 |
| |
| 1267 | + | |
| 1268 | + | |
1267 | 1269 |
| |
1268 | 1270 |
| |
1269 | 1271 |
| |
| |||
1593 | 1595 |
| |
1594 | 1596 |
| |
1595 | 1597 |
| |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1596 | 1601 |
| |
1597 | 1602 |
| |
1598 | 1603 |
| |
1599 | 1604 |
| |
1600 | 1605 |
| |
1601 |
| - | |
| 1606 | + | |
1602 | 1607 |
| |
1603 | 1608 |
| |
1604 | 1609 |
| |
|
0 commit comments
Comments
(0)