forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit66a9003
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. Comments about and the code manipulatingformatted_expr is updated to mention that it is now always set andis the expression that gives a JsonValueExpr its runtime value.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.Backpatched to 16 from the development branch to keep the code insync across branches.Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org>Discussion:https://postgr.es/m/CA+HiwqE4XTdfb1nW=Ojoy_tQSRhYt-q_kb6i5d4xcKyrLC1Nbg@mail.gmail.com1 parentc0f5313 commit66a9003
File tree
8 files changed
+56
-67
lines changed- src
- backend
- executor
- nodes
- optimizer/util
- parser
- include/nodes
8 files changed
+56
-67
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 & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
848 | 848 |
| |
849 | 849 |
| |
850 | 850 |
| |
851 |
| - | |
| 851 | + | |
| 852 | + | |
852 | 853 |
| |
853 | 854 |
| |
854 | 855 |
| |
855 |
| - | |
856 |
| - | |
| 856 | + | |
| 857 | + | |
857 | 858 |
| |
858 | 859 |
| |
859 | 860 |
| |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
225 | 225 |
| |
226 | 226 |
| |
227 | 227 |
| |
228 |
| - | |
229 |
| - | |
230 |
| - | |
| 228 | + | |
231 | 229 |
| |
232 | 230 |
| |
233 | 231 |
| |
|
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: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16353 | 16353 |
| |
16354 | 16354 |
| |
16355 | 16355 |
| |
16356 |
| - | |
| 16356 | + | |
| 16357 | + | |
| 16358 | + | |
16357 | 16359 |
| |
16358 | 16360 |
| |
16359 | 16361 |
| |
|
Lines changed: 32 additions & 25 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 |
| |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
3223 | 3212 |
| |
3224 | 3213 |
| |
3225 | 3214 |
| |
| |||
3268 | 3257 |
| |
3269 | 3258 |
| |
3270 | 3259 |
| |
3271 |
| - | |
3272 | 3260 |
| |
3273 | 3261 |
| |
3274 |
| - | |
3275 |
| - | |
3276 | 3262 |
| |
3277 | 3263 |
| |
3278 | 3264 |
| |
| |||
3310 | 3296 |
| |
3311 | 3297 |
| |
3312 | 3298 |
| |
3313 |
| - | |
| 3299 | + | |
3314 | 3300 |
| |
3315 | 3301 |
| |
3316 | 3302 |
| |
| |||
3322 | 3308 |
| |
3323 | 3309 |
| |
3324 | 3310 |
| |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
3325 | 3315 |
| |
3326 | 3316 |
| |
3327 | 3317 |
| |
| |||
3537 | 3527 |
| |
3538 | 3528 |
| |
3539 | 3529 |
| |
| 3530 | + | |
| 3531 | + | |
| 3532 | + | |
| 3533 | + | |
| 3534 | + | |
| 3535 | + | |
3540 | 3536 |
| |
3541 |
| - | |
| 3537 | + | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
3542 | 3546 |
| |
3543 | 3547 |
| |
3544 | 3548 |
| |
| |||
3635 | 3639 |
| |
3636 | 3640 |
| |
3637 | 3641 |
| |
3638 |
| - | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
3639 | 3648 |
| |
3640 | 3649 |
| |
3641 | 3650 |
| |
| |||
3900 | 3909 |
| |
3901 | 3910 |
| |
3902 | 3911 |
| |
3903 |
| - | |
| 3912 | + | |
3904 | 3913 |
| |
3905 | 3914 |
| |
3906 | 3915 |
| |
3907 |
| - | |
3908 |
| - | |
3909 |
| - | |
| 3916 | + | |
3910 | 3917 |
| |
3911 | 3918 |
| |
3912 | 3919 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
113 |
| - | |
| 113 | + | |
| 114 | + | |
114 | 115 |
| |
115 | 116 |
| |
116 | 117 |
| |
|
Lines changed: 7 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 | + | |
| 1601 | + | |
1596 | 1602 |
| |
1597 | 1603 |
| |
1598 | 1604 |
| |
1599 | 1605 |
| |
1600 | 1606 |
| |
1601 |
| - | |
| 1607 | + | |
1602 | 1608 |
| |
1603 | 1609 |
| |
1604 | 1610 |
| |
|
0 commit comments
Comments
(0)