forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit791b1b7
committed
Parse/analyze function renaming
There are three parallel ways to call parse/analyze: with fixedparameters, with variable parameters, and by supplying your own parsercallback. Some of the involved functions were confusingly named andmade this API structure more confusing. This patch renames somefunctions to make this clearer:parse_analyze() -> parse_analyze_fixedparams()pg_analyze_and_rewrite() -> pg_analyze_and_rewrite_fixedparams()(Otherwise one might think this variant doesn't accept parameters, butin fact all three ways accept parameters.)pg_analyze_and_rewrite_params() -> pg_analyze_and_rewrite_withcb()(Before, and also when considering pg_analyze_and_rewrite(), one mightthink this is the only way to pass parameters. Moreover, the parsercallback doesn't necessarily need to parse only parameters, it's justone of the things it could do.)parse_fixed_parameters() -> setup_parse_fixed_parameters()parse_variable_parameters() -> setup_parse_variable_parameters()(These functions don't actually do any parsing, they just set upcallbacks to use during parsing later.)This patch also adds some const decorations to the fixed-parametersAPI, so the distinction from the variable-parameters API is moreclear.Reviewed-by: Nathan Bossart <bossartn@amazon.com>Discussion:https://www.postgresql.org/message-id/flat/c67ce276-52b4-0239-dc0e-39875bf81840@enterprisedb.com1 parentd816f36 commit791b1b7
File tree
17 files changed
+41
-40
lines changed- src
- backend
- catalog
- commands
- executor
- optimizer/util
- parser
- tcop
- utils/cache
- include
- parser
- tcop
17 files changed
+41
-40
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
947 | 947 |
| |
948 | 948 |
| |
949 | 949 |
| |
950 |
| - | |
| 950 | + | |
951 | 951 |
| |
952 | 952 |
| |
953 | 953 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
439 | 439 |
| |
440 | 440 |
| |
441 | 441 |
| |
442 |
| - | |
| 442 | + | |
443 | 443 |
| |
444 | 444 |
| |
445 | 445 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
757 | 757 |
| |
758 | 758 |
| |
759 | 759 |
| |
760 |
| - | |
| 760 | + | |
761 | 761 |
| |
762 | 762 |
| |
763 | 763 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
175 |
| - | |
| 175 | + | |
176 | 176 |
| |
177 | 177 |
| |
178 | 178 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13181 | 13181 |
| |
13182 | 13182 |
| |
13183 | 13183 |
| |
13184 |
| - | |
| 13184 | + | |
13185 | 13185 |
| |
13186 | 13186 |
| |
13187 | 13187 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
439 | 439 |
| |
440 | 440 |
| |
441 | 441 |
| |
442 |
| - | |
| 442 | + | |
443 | 443 |
| |
444 | 444 |
| |
445 | 445 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
718 | 718 |
| |
719 | 719 |
| |
720 | 720 |
| |
721 |
| - | |
| 721 | + | |
722 | 722 |
| |
723 | 723 |
| |
724 | 724 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2258 | 2258 |
| |
2259 | 2259 |
| |
2260 | 2260 |
| |
2261 |
| - | |
| 2261 | + | |
2262 | 2262 |
| |
2263 | 2263 |
| |
2264 | 2264 |
| |
2265 | 2265 |
| |
2266 | 2266 |
| |
2267 | 2267 |
| |
2268 | 2268 |
| |
2269 |
| - | |
| 2269 | + | |
2270 | 2270 |
| |
2271 | 2271 |
| |
2272 | 2272 |
| |
| |||
2495 | 2495 |
| |
2496 | 2496 |
| |
2497 | 2497 |
| |
2498 |
| - | |
| 2498 | + | |
2499 | 2499 |
| |
2500 | 2500 |
| |
2501 | 2501 |
| |
2502 | 2502 |
| |
2503 | 2503 |
| |
2504 | 2504 |
| |
2505 | 2505 |
| |
2506 |
| - | |
| 2506 | + | |
2507 | 2507 |
| |
2508 | 2508 |
| |
2509 | 2509 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5057 | 5057 |
| |
5058 | 5058 |
| |
5059 | 5059 |
| |
5060 |
| - | |
| 5060 | + | |
5061 | 5061 |
| |
5062 | 5062 |
| |
5063 | 5063 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
99 |
| - | |
| 99 | + | |
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
110 |
| - | |
111 |
| - | |
| 110 | + | |
| 111 | + | |
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
123 |
| - | |
| 123 | + | |
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
161 |
| - | |
| 161 | + | |
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 |
| - | |
| 38 | + | |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 |
| - | |
68 |
| - | |
| 67 | + | |
| 68 | + | |
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
| 83 | + | |
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
| 6 | + | |
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
|
Lines changed: 9 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
637 | 637 |
| |
638 | 638 |
| |
639 | 639 |
| |
640 |
| - | |
641 |
| - | |
| 640 | + | |
| 641 | + | |
642 | 642 |
| |
643 | 643 |
| |
644 | 644 |
| |
| |||
652 | 652 |
| |
653 | 653 |
| |
654 | 654 |
| |
655 |
| - | |
| 655 | + | |
656 | 656 |
| |
657 | 657 |
| |
658 | 658 |
| |
| |||
669 | 669 |
| |
670 | 670 |
| |
671 | 671 |
| |
672 |
| - | |
673 |
| - | |
674 |
| - | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
675 | 676 |
| |
676 | 677 |
| |
677 |
| - | |
| 678 | + | |
678 | 679 |
| |
679 | 680 |
| |
680 | 681 |
| |
| |||
1125 | 1126 |
| |
1126 | 1127 |
| |
1127 | 1128 |
| |
1128 |
| - | |
| 1129 | + | |
1129 | 1130 |
| |
1130 | 1131 |
| |
1131 | 1132 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
682 | 682 |
| |
683 | 683 |
| |
684 | 684 |
| |
685 |
| - | |
| 685 | + | |
686 | 686 |
| |
687 | 687 |
| |
688 | 688 |
| |
689 | 689 |
| |
690 | 690 |
| |
691 |
| - | |
| 691 | + | |
692 | 692 |
| |
693 | 693 |
| |
694 | 694 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
24 | 24 |
| |
25 | 25 |
| |
26 | 26 |
| |
27 |
| - | |
28 |
| - | |
| 27 | + | |
| 28 | + | |
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
19 |
| - | |
20 |
| - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
| 48 | + | |
49 | 49 |
| |
50 |
| - | |
| 50 | + | |
51 | 51 |
| |
52 |
| - | |
| 52 | + | |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
|
0 commit comments
Comments
(0)