forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit639a86e
committed
Remove Value node struct
The Value node struct is a weird construct. It is its own node type,but most of the time, it actually has a node type of Integer, Float,String, or BitString. As a consequence, the struct name and the nodetype don't match most of the time, and so it has to be treatedspecially a lot. There doesn't seem to be any value in the specialconstruct. There is very little code that wants to accept all Valuevariants but nothing else (and even if it did, this doesn't provideany convenient way to check it), and most code wants either just oneparticular node type (usually String), or it accepts a broader set ofnode types besides just Value.This change removes the Value struct and node type and replaces themby separate Integer, Float, String, and BitString node types that areproper node types and structs of their own and behave mostly likenormal node types.Also, this removes the T_Null node tag, which was previously also apossible variant of Value but wasn't actually used outside of theValue contained in A_Const. Replace that by an isnull field inA_Const.Reviewed-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/5ba6bc5b-3f95-04f2-2419-f8ddb4c046fb@enterprisedb.com1 parentcbdf75b commit639a86e
File tree
30 files changed
+373
-337
lines changed- contrib/postgres_fdw
- src
- backend
- catalog
- commands
- executor
- nodes
- parser
- utils
- adt
- misc
- include
- nodes
- parser
30 files changed
+373
-337
lines changedLines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
104 |
| - | |
| 104 | + | |
105 | 105 |
| |
106 |
| - | |
| 106 | + | |
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
| |||
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 |
| - | |
| 125 | + | |
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 |
| - | |
| 129 | + | |
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
| |||
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
283 |
| - | |
| 283 | + | |
284 | 284 |
| |
285 |
| - | |
| 285 | + | |
286 | 286 |
| |
287 | 287 |
| |
288 | 288 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3026 | 3026 |
| |
3027 | 3027 |
| |
3028 | 3028 |
| |
3029 |
| - | |
| 3029 | + | |
3030 | 3030 |
| |
3031 | 3031 |
| |
3032 | 3032 |
| |
| |||
3140 | 3140 |
| |
3141 | 3141 |
| |
3142 | 3142 |
| |
3143 |
| - | |
| 3143 | + | |
3144 | 3144 |
| |
3145 | 3145 |
| |
3146 | 3146 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
851 | 851 |
| |
852 | 852 |
| |
853 | 853 |
| |
854 |
| - | |
| 854 | + | |
855 | 855 |
| |
856 | 856 |
| |
857 | 857 |
| |
| |||
1011 | 1011 |
| |
1012 | 1012 |
| |
1013 | 1013 |
| |
1014 |
| - | |
| 1014 | + | |
1015 | 1015 |
| |
1016 | 1016 |
| |
1017 | 1017 |
| |
| |||
1244 | 1244 |
| |
1245 | 1245 |
| |
1246 | 1246 |
| |
1247 |
| - | |
| 1247 | + | |
1248 | 1248 |
| |
1249 | 1249 |
| |
1250 | 1250 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 |
| - | |
| 58 | + | |
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
|
Lines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
222 | 222 |
| |
223 | 223 |
| |
224 | 224 |
| |
225 |
| - | |
226 |
| - | |
227 |
| - | |
| 225 | + | |
| 226 | + | |
228 | 227 |
| |
229 | 228 |
| |
230 | 229 |
| |
|
Lines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
| 61 | + | |
67 | 62 |
| |
68 | 63 |
| |
69 | 64 |
| |
| |||
206 | 201 |
| |
207 | 202 |
| |
208 | 203 |
| |
209 |
| - | |
| 204 | + | |
210 | 205 |
| |
211 | 206 |
| |
212 | 207 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1179 | 1179 |
| |
1180 | 1180 |
| |
1181 | 1181 |
| |
1182 |
| - | |
| 1182 | + | |
1183 | 1183 |
| |
1184 | 1184 |
| |
1185 | 1185 |
| |
| |||
1395 | 1395 |
| |
1396 | 1396 |
| |
1397 | 1397 |
| |
1398 |
| - | |
| 1398 | + | |
1399 | 1399 |
| |
1400 | 1400 |
| |
1401 | 1401 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
364 | 364 |
| |
365 | 365 |
| |
366 | 366 |
| |
367 |
| - | |
| 367 | + | |
368 | 368 |
| |
369 | 369 |
| |
370 | 370 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
|
Lines changed: 64 additions & 43 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2729 | 2729 |
| |
2730 | 2730 |
| |
2731 | 2731 |
| |
2732 |
| - | |
2733 |
| - | |
2734 |
| - | |
| 2732 | + | |
| 2733 | + | |
2735 | 2734 |
| |
2736 |
| - | |
2737 |
| - | |
2738 |
| - | |
2739 |
| - | |
2740 |
| - | |
2741 |
| - | |
2742 |
| - | |
2743 |
| - | |
2744 |
| - | |
2745 |
| - | |
2746 |
| - | |
2747 |
| - | |
2748 |
| - | |
2749 |
| - | |
2750 |
| - | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
2751 | 2756 |
| |
2752 | 2757 |
| |
2753 | 2758 |
| |
| |||
4892 | 4897 |
| |
4893 | 4898 |
| |
4894 | 4899 |
| |
4895 |
| - | |
4896 |
| - | |
| 4900 | + | |
| 4901 | + | |
4897 | 4902 |
| |
4898 |
| - | |
| 4903 | + | |
4899 | 4904 |
| |
4900 |
| - | |
| 4905 | + | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
| 4914 | + | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
| 4920 | + | |
| 4921 | + | |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
| 4925 | + | |
| 4926 | + | |
| 4927 | + | |
| 4928 | + | |
| 4929 | + | |
| 4930 | + | |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
| 4934 | + | |
| 4935 | + | |
4901 | 4936 |
| |
4902 |
| - | |
4903 |
| - | |
4904 |
| - | |
4905 |
| - | |
4906 |
| - | |
4907 |
| - | |
4908 |
| - | |
4909 |
| - | |
4910 |
| - | |
4911 |
| - | |
4912 |
| - | |
4913 |
| - | |
4914 |
| - | |
4915 |
| - | |
4916 |
| - | |
4917 |
| - | |
4918 |
| - | |
4919 |
| - | |
4920 |
| - | |
4921 | 4937 |
| |
4922 | 4938 |
| |
4923 | 4939 |
| |
| |||
5314 | 5330 |
| |
5315 | 5331 |
| |
5316 | 5332 |
| |
| 5333 | + | |
| 5334 | + | |
5317 | 5335 |
| |
| 5336 | + | |
| 5337 | + | |
5318 | 5338 |
| |
| 5339 | + | |
| 5340 | + | |
5319 | 5341 |
| |
5320 |
| - | |
5321 |
| - | |
| 5342 | + | |
5322 | 5343 |
| |
5323 | 5344 |
| |
5324 | 5345 |
| |
|
Lines changed: 33 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2409 | 2409 |
| |
2410 | 2410 |
| |
2411 | 2411 |
| |
2412 |
| - | |
| 2412 | + | |
2413 | 2413 |
| |
2414 | 2414 |
| |
2415 | 2415 |
| |
| |||
3089 | 3089 |
| |
3090 | 3090 |
| |
3091 | 3091 |
| |
3092 |
| - | |
| 3092 | + | |
3093 | 3093 |
| |
3094 |
| - | |
| 3094 | + | |
3095 | 3095 |
| |
3096 |
| - | |
3097 |
| - | |
3098 |
| - | |
3099 |
| - | |
3100 |
| - | |
3101 |
| - | |
3102 |
| - | |
3103 |
| - | |
3104 |
| - | |
3105 |
| - | |
3106 |
| - | |
3107 |
| - | |
3108 |
| - | |
3109 |
| - | |
3110 |
| - | |
3111 |
| - | |
3112 |
| - | |
| 3096 | + | |
| 3097 | + | |
| 3098 | + | |
| 3099 | + | |
| 3100 | + | |
| 3101 | + | |
| 3102 | + | |
| 3103 | + | |
| 3104 | + | |
| 3105 | + | |
| 3106 | + | |
| 3107 | + | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
| 3111 | + | |
| 3112 | + | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
| 3116 | + | |
| 3117 | + | |
| 3118 | + | |
3113 | 3119 |
| |
3114 | 3120 |
| |
3115 | 3121 |
| |
| |||
3337 | 3343 |
| |
3338 | 3344 |
| |
3339 | 3345 |
| |
| 3346 | + | |
| 3347 | + | |
3340 | 3348 |
| |
| 3349 | + | |
| 3350 | + | |
3341 | 3351 |
| |
| 3352 | + | |
| 3353 | + | |
3342 | 3354 |
| |
3343 |
| - | |
3344 |
| - | |
| 3355 | + | |
3345 | 3356 |
| |
3346 | 3357 |
| |
3347 | 3358 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3537 | 3537 |
| |
3538 | 3538 |
| |
3539 | 3539 |
| |
3540 |
| - | |
3541 | 3540 |
| |
3542 | 3541 |
| |
3543 | 3542 |
| |
|
0 commit comments
Comments
(0)