forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbc08520
committed
Change CREATE STATISTICS syntax
Previously, we had the WITH clause in the middle of the command, whereyou'd specify both generic options as well as statistic types. Fewpeople liked this, so this commit changes it to remove the WITH keywordfrom that clause and makes it accept statistic types only. (Wecurrently don't have any generic options, but if we invent in thefuture, we will gain a new WITH clause, probably at the end of thecommand).Also, the column list is now specified without parens, which makes thewhole command look more similar to a SELECT command. This change willlet us expand the command to supporting expressions (not just columnsnames) as well as multiple tables and their join conditions.Tom added lots of code comments and fixed some parts of the CREATESTATISTICS reference page, too; more changes in this area areforthcoming. He also fixed a potential problem in the alter_genericregression test, reducing verbosity on a cascaded drop to avoiddependency on message ordering, as we do in other tests.Tom also closed a security bug: we documented that table ownership wasrequired in order to create a statistics object on it, but didn'tactually implement it.Implement tab-completion for statistics objects. This can stand somemore improvement.Authors: Alvaro Herrera, with lots of cleanup by Tom LaneDiscussion:https://postgr.es/m/20170420212426.ltvgyhnefvhixm6i@alvherre.pgsql1 parent46052d9 commitbc08520
File tree
21 files changed
+321
-286
lines changed- doc/src/sgml
- ref
- src
- backend
- commands
- nodes
- parser
- utils/adt
- bin
- pg_dump/t
- psql
- include/nodes
- test/regress
- expected
- sql
21 files changed
+321
-286
lines changedLines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1132 | 1132 |
| |
1133 | 1133 |
| |
1134 | 1134 |
| |
1135 |
| - | |
1136 |
| - | |
| 1135 | + | |
| 1136 | + | |
1137 | 1137 |
| |
1138 | 1138 |
| |
1139 | 1139 |
| |
| |||
1219 | 1219 |
| |
1220 | 1220 |
| |
1221 | 1221 |
| |
1222 |
| - | |
1223 |
| - | |
| 1222 | + | |
| 1223 | + | |
1224 | 1224 |
| |
1225 | 1225 |
| |
1226 | 1226 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
526 | 526 |
| |
527 | 527 |
| |
528 | 528 |
| |
529 |
| - | |
| 529 | + | |
530 | 530 |
| |
531 | 531 |
| |
532 | 532 |
| |
| |||
569 | 569 |
| |
570 | 570 |
| |
571 | 571 |
| |
572 |
| - | |
| 572 | + | |
573 | 573 |
| |
574 | 574 |
| |
575 | 575 |
| |
|
Lines changed: 15 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
| 37 | + | |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
43 |
| - | |
44 |
| - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
50 | 51 |
| |
51 | 52 |
| |
52 | 53 |
| |
| |||
59 | 60 |
| |
60 | 61 |
| |
61 | 62 |
| |
62 |
| - | |
| 63 | + | |
| 64 | + | |
63 | 65 |
| |
64 | 66 |
| |
65 | 67 |
| |
| |||
68 | 70 |
| |
69 | 71 |
| |
70 | 72 |
| |
71 |
| - | |
| 73 | + | |
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
| |||
77 | 79 |
| |
78 | 80 |
| |
79 | 81 |
| |
80 |
| - | |
| 82 | + | |
81 | 83 |
| |
82 | 84 |
| |
83 | 85 |
| |
| |||
86 | 88 |
| |
87 | 89 |
| |
88 | 90 |
| |
89 |
| - | |
| 91 | + | |
90 | 92 |
| |
91 | 93 |
| |
92 | 94 |
| |
| |||
99 | 101 |
| |
100 | 102 |
| |
101 | 103 |
| |
102 |
| - | |
| 104 | + | |
103 | 105 |
| |
104 | 106 |
| |
105 | 107 |
| |
|
Lines changed: 34 additions & 51 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
26 |
| - | |
| 25 | + | |
| 26 | + | |
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
38 |
| - | |
39 |
| - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
45 |
| - | |
46 |
| - | |
47 |
| - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
61 |
| - | |
62 |
| - | |
63 |
| - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
72 |
| - | |
| 72 | + | |
| 73 | + | |
73 | 74 |
| |
74 | 75 |
| |
75 | 76 |
| |
76 | 77 |
| |
77 | 78 |
| |
78 |
| - | |
| 79 | + | |
79 | 80 |
| |
80 | 81 |
| |
81 |
| - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 |
| |
83 | 88 |
| |
84 | 89 |
| |
85 | 90 |
| |
86 | 91 |
| |
87 |
| - | |
88 |
| - | |
89 |
| - | |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 |
| - | |
| 92 | + | |
114 | 93 |
| |
115 | 94 |
| |
116 |
| - | |
| 95 | + | |
117 | 96 |
| |
118 | 97 |
| |
119 | 98 |
| |
120 | 99 |
| |
121 | 100 |
| |
122 |
| - | |
| 101 | + | |
123 | 102 |
| |
124 | 103 |
| |
125 |
| - | |
| 104 | + | |
| 105 | + | |
126 | 106 |
| |
127 | 107 |
| |
128 | 108 |
| |
129 | 109 |
| |
130 |
| - | |
131 |
| - | |
132 |
| - | |
| 110 | + | |
133 | 111 |
| |
134 | 112 |
| |
135 | 113 |
| |
| |||
158 | 136 |
| |
159 | 137 |
| |
160 | 138 |
| |
161 |
| - | |
| 139 | + | |
162 | 140 |
| |
163 | 141 |
| |
164 | 142 |
| |
| |||
168 | 146 |
| |
169 | 147 |
| |
170 | 148 |
| |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
171 | 154 |
| |
172 | 155 |
| |
173 | 156 |
| |
| |||
176 | 159 |
| |
177 | 160 |
| |
178 | 161 |
| |
179 |
| - | |
| 162 | + | |
180 | 163 |
| |
181 | 164 |
| |
182 | 165 |
| |
|
Lines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
33 |
| - | |
34 |
| - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
48 |
| - | |
| 47 | + | |
| 48 | + | |
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 |
| - | |
| 69 | + | |
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 |
| - | |
| 85 | + | |
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
|
0 commit comments
Comments
(0)