forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5564c11
committed
Clone extended stats in CREATE TABLE (LIKE INCLUDING ALL)
The LIKE INCLUDING ALL clause to CREATE TABLE intuitively indicatescloning of extended statistics on the source table, but it failed to doso. Patch it up so that it does. Also include an INCLUDING STATISTICSoption to the LIKE clause, so that the behavior can be requestedindividually, or excluded individually.While at it, reorder the INCLUDING options, both in code and in docs, inalphabetical order which makes more sense than feature-implementationorder that was previously used.Backpatch this to Postgres 10, where extended statistics wereintroduced, because this is seen as an oversight in a fresh featurewhich is better to get consistent from the get-go instead of changingonly in pg11.In pg11, comments on statistics objects are cloned too. In pg10 theyare not, because I (Álvaro) was too coward to change the parse node asrequired to support it. Also, in pg10 I chose not to renumber theparser symbols for the various INCLUDING options in LIKE, for the samereason. Any corresponding user-visible changes (docs) are backpatched,though.Reported-by: Stephen FroehlichAuthor: David RowleyReviewed-by: Álvaro Herrera, Tomas VondraDiscussion:https://postgr.es/m/CY1PR0601MB1927315B45667A1B679D0FD5E5EF0@CY1PR0601MB1927.namprd06.prod.outlook.com1 parentc2c537c commit5564c11
File tree
11 files changed
+323
-37
lines changed- doc/src/sgml/ref
- src
- backend
- commands
- nodes
- parser
- include/nodes
- test/regress
- expected
- sql
11 files changed
+323
-37
lines changedLines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 |
| - | |
| 85 | + | |
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
| |||
591 | 591 |
| |
592 | 592 |
| |
593 | 593 |
| |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
594 | 598 |
| |
595 | 599 |
| |
596 | 600 |
| |
| |||
616 | 620 |
| |
617 | 621 |
| |
618 | 622 |
| |
619 |
| - | |
| 623 | + | |
620 | 624 |
| |
621 | 625 |
| |
622 | 626 |
| |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1805 | 1805 |
| |
1806 | 1806 |
| |
1807 | 1807 |
| |
1808 |
| - | |
| 1808 | + | |
| 1809 | + | |
1809 | 1810 |
| |
1810 | 1811 |
| |
1811 | 1812 |
| |
| |||
1981 | 1982 |
| |
1982 | 1983 |
| |
1983 | 1984 |
| |
| 1985 | + | |
| 1986 | + | |
1984 | 1987 |
| |
1985 | 1988 |
| |
1986 | 1989 |
| |
|
Lines changed: 142 additions & 27 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| 23 | + | |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
| |||
31 | 32 |
| |
32 | 33 |
| |
33 | 34 |
| |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 |
| |
35 | 41 |
| |
36 | 42 |
| |
| |||
51 | 57 |
| |
52 | 58 |
| |
53 | 59 |
| |
54 |
| - | |
55 | 60 |
| |
56 | 61 |
| |
57 | 62 |
| |
| |||
75 | 80 |
| |
76 | 81 |
| |
77 | 82 |
| |
78 |
| - | |
79 |
| - | |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 | 83 |
| |
104 | 84 |
| |
105 | 85 |
| |
| |||
148 | 128 |
| |
149 | 129 |
| |
150 | 130 |
| |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
151 | 170 |
| |
152 | 171 |
| |
153 | 172 |
| |
| |||
288 | 307 |
| |
289 | 308 |
| |
290 | 309 |
| |
291 |
| - | |
| 310 | + | |
292 | 311 |
| |
293 | 312 |
| |
294 | 313 |
| |
| |||
340 | 359 |
| |
341 | 360 |
| |
342 | 361 |
| |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
343 | 367 |
| |
344 | 368 |
| |
345 | 369 |
| |
| |||
405 | 429 |
| |
406 | 430 |
| |
407 | 431 |
| |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3424 | 3424 |
| |
3425 | 3425 |
| |
3426 | 3426 |
| |
| 3427 | + | |
3427 | 3428 |
| |
3428 | 3429 |
| |
3429 | 3430 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1363 | 1363 |
| |
1364 | 1364 |
| |
1365 | 1365 |
| |
| 1366 | + | |
1366 | 1367 |
| |
1367 | 1368 |
| |
1368 | 1369 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2687 | 2687 |
| |
2688 | 2688 |
| |
2689 | 2689 |
| |
| 2690 | + | |
2690 | 2691 |
| |
2691 | 2692 |
| |
2692 | 2693 |
| |
|
Lines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3636 | 3636 |
| |
3637 | 3637 |
| |
3638 | 3638 |
| |
3639 |
| - | |
| 3639 | + | |
3640 | 3640 |
| |
| 3641 | + | |
3641 | 3642 |
| |
3642 | 3643 |
| |
| 3644 | + | |
3643 | 3645 |
| |
3644 |
| - | |
3645 | 3646 |
| |
3646 | 3647 |
| |
3647 | 3648 |
| |
| |||
3980 | 3981 |
| |
3981 | 3982 |
| |
3982 | 3983 |
| |
| 3984 | + | |
3983 | 3985 |
| |
3984 | 3986 |
| |
3985 | 3987 |
| |
| |||
3991 | 3993 |
| |
3992 | 3994 |
| |
3993 | 3995 |
| |
| 3996 | + | |
3994 | 3997 |
| |
3995 | 3998 |
| |
3996 | 3999 |
| |
|
0 commit comments
Comments
(0)