forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7072635
committed
Fix parse location tracking for lists that can be empty.
The previous coding of the YYLLOC_DEFAULT macro behaved strangely for emptyproductions, assigning the previous nonterminal's location as the parselocation of the result. The usefulness of that was (at best) debatablealready, but the real problem is that in list-generating nonterminals likeOptFooList: /* EMPTY */ { ... } | OptFooList Foo { ... } ;the initially-identified location would get copied up, so that even anonempty list would be given a bogus parse location. Document how to workaround that, and do so for OptSchemaEltList, so that the error conditionjust added for CREATE SCHEMA IF NOT EXISTS produces a sane error cursor.So far as I can tell, there are currently no other cases where thesituation arises, so we don't need other instances of this coding yet.1 parent7e389f7 commit7072635
2 files changed
+31
-7
lines changedLines changed: 29 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 |
| - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
71 | 74 |
| |
72 | 75 |
| |
73 |
| - | |
| 76 | + | |
74 | 77 |
| |
75 | 78 |
| |
76 |
| - | |
| 79 | + | |
77 | 80 |
| |
78 | 81 |
| |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
79 | 97 |
| |
80 | 98 |
| |
81 | 99 |
| |
| |||
1223 | 1241 |
| |
1224 | 1242 |
| |
1225 | 1243 |
| |
1226 |
| - | |
1227 |
| - | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
1228 | 1252 |
| |
1229 | 1253 |
| |
1230 | 1254 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
51 |
| - | |
| 50 | + | |
| 51 | + | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
|
0 commit comments
Comments
(0)