- Notifications
You must be signed in to change notification settings - Fork5
Commit05e3d0e
committed
Reimplementation of UNION/INTERSECT/EXCEPT. INTERSECT/EXCEPT now meet the
SQL92 semantics, including support for ALL option. All three can be usedin subqueries and views. DISTINCT and ORDER BY work now in views, too.This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECTwhere the SELECT yields different datatypes than the INSERT needs. I didthat by making UNION subqueries and SELECT in INSERT be treated likesubselects-in-FROM, thereby allowing an extra level of targetlist where thedatatype conversions can be inserted safely.INITDB NEEDED!1 parent5292637 commit05e3d0e
File tree
51 files changed
+2588
-1902
lines changed- src
- backend
- commands
- executor
- nodes
- optimizer
- path
- plan
- prep
- util
- parser
- rewrite
- utils/adt
- include
- catalog
- executor
- nodes
- optimizer
- parser
- test/regress
- expected
- sql
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
51 files changed
+2588
-1902
lines changedLines changed: 21 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
| |||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
200 | 220 |
| |
201 | 221 |
| |
202 | 222 |
| |
| |||
320 | 340 |
| |
321 | 341 |
| |
322 | 342 |
| |
323 |
| - | |
324 |
| - | |
325 | 343 |
| |
326 | 344 |
| |
327 | 345 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
9 |
| - | |
| 9 | + | |
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
| 45 | + | |
45 | 46 |
| |
46 | 47 |
| |
47 | 48 |
| |
| |||
345 | 346 |
| |
346 | 347 |
| |
347 | 348 |
| |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
348 | 353 |
| |
349 | 354 |
| |
350 | 355 |
| |
|
Lines changed: 2 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 |
| - | |
| 30 | + | |
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| |||
463 | 463 |
| |
464 | 464 |
| |
465 | 465 |
| |
466 |
| - | |
467 | 466 |
| |
468 | 467 |
| |
469 | 468 |
| |
| |||
474 | 473 |
| |
475 | 474 |
| |
476 | 475 |
| |
477 |
| - | |
478 |
| - | |
479 |
| - | |
480 | 476 |
| |
481 | 477 |
| |
482 | 478 |
| |
483 |
| - | |
| 479 | + | |
484 | 480 |
| |
485 |
| - | |
486 | 481 |
| |
487 | 482 |
| |
488 | 483 |
| |
|
Lines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| |||
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
| 91 | + | |
91 | 92 |
| |
92 | 93 |
| |
93 | 94 |
| |
| |||
199 | 200 |
| |
200 | 201 |
| |
201 | 202 |
| |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
202 | 207 |
| |
203 | 208 |
| |
204 | 209 |
| |
| |||
322 | 327 |
| |
323 | 328 |
| |
324 | 329 |
| |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
325 | 334 |
| |
326 | 335 |
| |
327 | 336 |
| |
| |||
401 | 410 |
| |
402 | 411 |
| |
403 | 412 |
| |
| 413 | + | |
| 414 | + | |
| 415 | + | |
404 | 416 |
| |
405 | 417 |
| |
406 | 418 |
| |
| |||
519 | 531 |
| |
520 | 532 |
| |
521 | 533 |
| |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
522 | 538 |
| |
523 | 539 |
| |
524 | 540 |
| |
|
Lines changed: 11 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
762 | 762 |
| |
763 | 763 |
| |
764 | 764 |
| |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
765 | 773 |
| |
766 | 774 |
| |
767 | 775 |
| |
| |||
783 | 791 |
| |
784 | 792 |
| |
785 | 793 |
| |
786 |
| - | |
787 |
| - | |
| 794 | + | |
| 795 | + | |
788 | 796 |
| |
789 | 797 |
| |
790 | 798 |
| |
|
Lines changed: 11 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
80 | 80 |
| |
81 | 81 |
| |
82 | 82 |
| |
83 |
| - | |
84 | 83 |
| |
85 | 84 |
| |
86 |
| - | |
87 |
| - | |
| 85 | + | |
88 | 86 |
| |
89 | 87 |
| |
90 | 88 |
| |
| |||
98 | 96 |
| |
99 | 97 |
| |
100 | 98 |
| |
101 |
| - | |
102 |
| - | |
| 99 | + | |
103 | 100 |
| |
104 | 101 |
| |
105 | 102 |
| |
| |||
131 | 128 |
| |
132 | 129 |
| |
133 | 130 |
| |
134 |
| - | |
135 |
| - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
136 | 134 |
| |
137 | 135 |
| |
138 | 136 |
| |
139 | 137 |
| |
140 |
| - | |
| 138 | + | |
141 | 139 |
| |
142 |
| - | |
143 | 140 |
| |
144 | 141 |
| |
145 |
| - | |
146 |
| - | |
147 | 142 |
| |
148 | 143 |
| |
149 | 144 |
| |
| |||
181 | 176 |
| |
182 | 177 |
| |
183 | 178 |
| |
184 |
| - | |
| 179 | + | |
185 | 180 |
| |
186 | 181 |
| |
187 | 182 |
| |
| |||
201 | 196 |
| |
202 | 197 |
| |
203 | 198 |
| |
204 |
| - | |
| 199 | + | |
205 | 200 |
| |
206 | 201 |
| |
207 | 202 |
| |
| |||
214 | 209 |
| |
215 | 210 |
| |
216 | 211 |
| |
217 |
| - | |
218 | 212 |
| |
219 | 213 |
| |
220 | 214 |
| |
| |||
250 | 244 |
| |
251 | 245 |
| |
252 | 246 |
| |
253 |
| - | |
| 247 | + | |
254 | 248 |
| |
255 | 249 |
| |
256 | 250 |
| |
| |||
522 | 516 |
| |
523 | 517 |
| |
524 | 518 |
| |
525 |
| - | |
526 |
| - | |
| 519 | + | |
527 | 520 |
| |
528 | 521 |
| |
529 | 522 |
| |
|
0 commit comments
Comments
(0)