forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita654af2
committed
Preliminary refactoring of plpgsql expression construction.
This short and boring patch simply moves the responsibility forinitializing PLpgSQL_expr.target_param into plpgsql parsing,rather than doing it at first execution of the expr as before.This doesn't save anything in terms of runtime, since the work wastrivial and done only once per expr anyway. But it makes the infoavailable during parsing, which will be useful for the next step.Likewise set PLpgSQL_expr.func during parsing. According to thecomments, this was once impossible; but it's certainly possiblesince we invented the plpgsql_curr_compile variable. Again, thissaves little runtime, but it seems far cleaner conceptually.While at it, I reordered stuff in struct PLpgSQL_expr to make itclearer which fields are filled when, and merged some duplicativecode in pl_gram.y.Author: Tom Lane <tgl@sss.pgh.pa.us>Reviewed-by: Andrey Borodin <x4mmm@yandex-team.ru>Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>Discussion:https://postgr.es/m/CACxu=vJaKFNsYxooSnW1wEgsAO5u_v1XYBacfVJ14wgJV_PYeg@mail.gmail.com1 parent6a7283d commita654af2
3 files changed
+62
-61
lines changedLines changed: 0 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4174 | 4174 |
| |
4175 | 4175 |
| |
4176 | 4176 |
| |
4177 |
| - | |
4178 |
| - | |
4179 |
| - | |
4180 |
| - | |
4181 |
| - | |
4182 |
| - | |
4183 | 4177 |
| |
4184 | 4178 |
| |
4185 | 4179 |
| |
| |||
5016 | 5010 |
| |
5017 | 5011 |
| |
5018 | 5012 |
| |
5019 |
| - | |
5020 |
| - | |
5021 |
| - | |
5022 |
| - | |
5023 |
| - | |
5024 |
| - | |
5025 |
| - | |
5026 |
| - | |
5027 |
| - | |
5028 |
| - | |
5029 |
| - | |
5030 |
| - | |
5031 |
| - | |
5032 | 5013 |
| |
5033 |
| - | |
5034 | 5014 |
| |
5035 | 5015 |
| |
5036 | 5016 |
| |
| |||
6282 | 6262 |
| |
6283 | 6263 |
| |
6284 | 6264 |
| |
6285 |
| - | |
6286 |
| - | |
6287 |
| - | |
6288 |
| - | |
6289 |
| - | |
6290 |
| - | |
6291 |
| - | |
6292 | 6265 |
| |
6293 | 6266 |
| |
6294 | 6267 |
| |
|
Lines changed: 44 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 |
| |
65 | 69 |
| |
66 | 70 |
| |
| |||
536 | 540 |
| |
537 | 541 |
| |
538 | 542 |
| |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
539 | 547 |
| |
540 | 548 |
| |
541 | 549 |
| |
| |||
996 | 1004 |
| |
997 | 1005 |
| |
998 | 1006 |
| |
| 1007 | + | |
999 | 1008 |
| |
1000 | 1009 |
| |
1001 | 1010 |
| |
| |||
2651 | 2660 |
| |
2652 | 2661 |
| |
2653 | 2662 |
| |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
2654 | 2695 |
| |
2655 | 2696 |
| |
2656 | 2697 |
| |
| |||
2794 | 2835 |
| |
2795 | 2836 |
| |
2796 | 2837 |
| |
2797 |
| - | |
2798 |
| - | |
2799 |
| - | |
2800 |
| - | |
2801 |
| - | |
2802 |
| - | |
2803 |
| - | |
| 2838 | + | |
2804 | 2839 |
| |
2805 | 2840 |
| |
2806 | 2841 |
| |
| |||
3122 | 3157 |
| |
3123 | 3158 |
| |
3124 | 3159 |
| |
3125 |
| - | |
3126 |
| - | |
3127 |
| - | |
3128 |
| - | |
3129 |
| - | |
3130 |
| - | |
3131 |
| - | |
| 3160 | + | |
3132 | 3161 |
| |
3133 | 3162 |
| |
3134 | 3163 |
| |
| |||
4006 | 4035 |
| |
4007 | 4036 |
| |
4008 | 4037 |
| |
4009 |
| - | |
4010 |
| - | |
4011 |
| - | |
4012 |
| - | |
4013 |
| - | |
4014 |
| - | |
4015 |
| - | |
| 4038 | + | |
4016 | 4039 |
| |
4017 | 4040 |
| |
4018 | 4041 |
| |
|
Lines changed: 18 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
222 |
| - | |
223 |
| - | |
| 222 | + | |
| 223 | + | |
224 | 224 |
| |
225 |
| - | |
226 |
| - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
227 | 231 |
| |
228 |
| - | |
229 |
| - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
230 | 238 |
| |
231 | 239 |
| |
232 | 240 |
| |
| |||
235 | 243 |
| |
236 | 244 |
| |
237 | 245 |
| |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
244 | 250 |
| |
245 |
| - | |
246 | 251 |
| |
247 | 252 |
| |
248 | 253 |
| |
|
0 commit comments
Comments
(0)