forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0bd4da2
committed
Ensure that typmod decoration on a datatype name is validated in all cases,
even in code paths where we don't pay any subsequent attention to the typmodvalue. This seems needed in view of the fact that 8.3's generalized typmodsupport will accept a lot of bogus syntax, such as "timestamp(foo)" or"record(int, 42)" --- if we allow such things to pass without comment,users will get confused. Per a recent example from Greg Stark.To implement this in a way that's not very vulnerable to futurebugs-of-omission, refactor the API of parse_type.c's TypeName lookup routinesso that typmod validation is folded into the base lookup operation. Callerscan still choose not to receive the encoded typmod, but we'll check thedecoration anyway if it's present.1 parent6b8cc88 commit0bd4da2
File tree
18 files changed
+341
-288
lines changed- src
- backend
- access/common
- commands
- parser
- utils/misc
- include/parser
- pl/plpgsql/src
18 files changed
+341
-288
lines changedLines changed: 2 additions & 3 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 |
| |
| |||
534 | 534 |
| |
535 | 535 |
| |
536 | 536 |
| |
537 |
| - | |
538 |
| - | |
| 537 | + | |
539 | 538 |
| |
540 | 539 |
| |
541 | 540 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 |
| - | |
| 145 | + | |
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 |
| - | |
| 167 | + | |
168 | 168 |
| |
169 | 169 |
| |
170 | 170 |
| |
| |||
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
178 |
| - | |
| 178 | + | |
179 | 179 |
| |
180 | 180 |
| |
181 | 181 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
874 | 874 |
| |
875 | 875 |
| |
876 | 876 |
| |
877 |
| - | |
| 877 | + | |
878 | 878 |
| |
879 | 879 |
| |
880 | 880 |
| |
| |||
1451 | 1451 |
| |
1452 | 1452 |
| |
1453 | 1453 |
| |
1454 |
| - | |
1455 |
| - | |
| 1454 | + | |
| 1455 | + | |
1456 | 1456 |
| |
1457 | 1457 |
| |
1458 | 1458 |
| |
|
Lines changed: 25 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
| 79 | + | |
79 | 80 |
| |
80 |
| - | |
| 81 | + | |
81 | 82 |
| |
82 |
| - | |
| 83 | + | |
83 | 84 |
| |
84 |
| - | |
| 85 | + | |
85 | 86 |
| |
86 | 87 |
| |
87 | 88 |
| |
| |||
94 | 95 |
| |
95 | 96 |
| |
96 | 97 |
| |
| 98 | + | |
| 99 | + | |
97 | 100 |
| |
98 | 101 |
| |
99 | 102 |
| |
| |||
114 | 117 |
| |
115 | 118 |
| |
116 | 119 |
| |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
117 | 127 |
| |
118 | 128 |
| |
119 | 129 |
| |
| |||
175 | 185 |
| |
176 | 186 |
| |
177 | 187 |
| |
| 188 | + | |
178 | 189 |
| |
179 |
| - | |
180 |
| - | |
| 190 | + | |
| 191 | + | |
181 | 192 |
| |
182 |
| - | |
| 193 | + | |
183 | 194 |
| |
184 | 195 |
| |
185 | 196 |
| |
| |||
193 | 204 |
| |
194 | 205 |
| |
195 | 206 |
| |
| 207 | + | |
| 208 | + | |
196 | 209 |
| |
197 | 210 |
| |
198 | 211 |
| |
199 | 212 |
| |
200 | 213 |
| |
201 | 214 |
| |
202 | 215 |
| |
| 216 | + | |
203 | 217 |
| |
204 | 218 |
| |
205 | 219 |
| |
| |||
1341 | 1355 |
| |
1342 | 1356 |
| |
1343 | 1357 |
| |
1344 |
| - | |
1345 |
| - | |
| 1358 | + | |
| 1359 | + | |
1346 | 1360 |
| |
1347 | 1361 |
| |
1348 | 1362 |
| |
| |||
1567 | 1581 |
| |
1568 | 1582 |
| |
1569 | 1583 |
| |
1570 |
| - | |
1571 |
| - | |
| 1584 | + | |
| 1585 | + | |
1572 | 1586 |
| |
1573 | 1587 |
| |
1574 | 1588 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
327 | 327 |
| |
328 | 328 |
| |
329 | 329 |
| |
330 |
| - | |
| 330 | + | |
331 | 331 |
| |
332 | 332 |
| |
333 | 333 |
| |
| |||
481 | 481 |
| |
482 | 482 |
| |
483 | 483 |
| |
484 |
| - | |
| 484 | + | |
485 | 485 |
| |
486 | 486 |
| |
487 | 487 |
| |
| |||
1035 | 1035 |
| |
1036 | 1036 |
| |
1037 | 1037 |
| |
1038 |
| - | |
| 1038 | + | |
1039 | 1039 |
| |
1040 | 1040 |
| |
1041 | 1041 |
| |
1042 | 1042 |
| |
1043 |
| - | |
| 1043 | + | |
1044 | 1044 |
| |
1045 | 1045 |
| |
1046 | 1046 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 |
| - | |
| 152 | + | |
153 | 153 |
| |
154 |
| - | |
| 154 | + | |
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
90 | 90 |
| |
91 | 91 |
| |
92 | 92 |
| |
93 |
| - | |
| 93 | + | |
94 | 94 |
| |
95 | 95 |
| |
96 | 96 |
| |
|
Lines changed: 8 additions & 15 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 |
| |
| |||
899 | 899 |
| |
900 | 900 |
| |
901 | 901 |
| |
902 |
| - | |
903 |
| - | |
| 902 | + | |
904 | 903 |
| |
905 | 904 |
| |
906 | 905 |
| |
| |||
1044 | 1043 |
| |
1045 | 1044 |
| |
1046 | 1045 |
| |
1047 |
| - | |
1048 |
| - | |
1049 |
| - | |
1050 |
| - | |
| 1046 | + | |
| 1047 | + | |
1051 | 1048 |
| |
1052 | 1049 |
| |
1053 | 1050 |
| |
| |||
3018 | 3015 |
| |
3019 | 3016 |
| |
3020 | 3017 |
| |
3021 |
| - | |
3022 |
| - | |
| 3018 | + | |
3023 | 3019 |
| |
3024 | 3020 |
| |
3025 | 3021 |
| |
| |||
3074 | 3070 |
| |
3075 | 3071 |
| |
3076 | 3072 |
| |
3077 |
| - | |
| 3073 | + | |
3078 | 3074 |
| |
3079 | 3075 |
| |
3080 |
| - | |
3081 | 3076 |
| |
3082 | 3077 |
| |
3083 | 3078 |
| |
| |||
4777 | 4772 |
| |
4778 | 4773 |
| |
4779 | 4774 |
| |
4780 |
| - | |
4781 |
| - | |
| 4775 | + | |
4782 | 4776 |
| |
4783 | 4777 |
| |
4784 | 4778 |
| |
| |||
4905 | 4899 |
| |
4906 | 4900 |
| |
4907 | 4901 |
| |
4908 |
| - | |
| 4902 | + | |
4909 | 4903 |
| |
4910 | 4904 |
| |
4911 |
| - | |
4912 | 4905 |
| |
4913 | 4906 |
| |
4914 | 4907 |
| |
|
0 commit comments
Comments
(0)