forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit56be925
committed
Further tweaking of raw grammar output to distinguish different inputs.
Use a different A_Expr_Kind for LIKE/ILIKE/SIMILAR TO constructs, so thatthey can be distinguished from direct invocation of the underlyingoperators. Also, postpone selection of the operator name when transforming"x IN (select)" to "x = ANY (select)", so that those syntaxes can be toldapart at parse analysis time.I had originally thought I'd also have to do something special for thesyntaxes IS NOT DISTINCT FROM, IS NOT DOCUMENT, and x NOT IN (SELECT...),which the grammar translates as though they were NOT (construct).On reflection though, we can distinguish those cases reliably by notingwhether the parse location shown for the NOT is the same as for its childnode. This only requires tweaking the parse locations for NOT IN, whichI've done here.These changes should have no effect outside the parser; they're just insupport of being able to give accurate warnings for planned operatorprecedence changes.1 parent296f3a6 commit56be925
File tree
5 files changed
+63
-17
lines changed- src
- backend
- nodes
- parser
- include/nodes
5 files changed
+63
-17
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2516 | 2516 |
| |
2517 | 2517 |
| |
2518 | 2518 |
| |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
2519 | 2531 |
| |
2520 | 2532 |
| |
2521 | 2533 |
| |
|
Lines changed: 36 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11220 | 11220 |
| |
11221 | 11221 |
| |
11222 | 11222 |
| |
11223 |
| - | |
| 11223 | + | |
| 11224 | + | |
| 11225 | + | |
| 11226 | + | |
11224 | 11227 |
| |
11225 | 11228 |
| |
11226 | 11229 |
| |
11227 | 11230 |
| |
11228 | 11231 |
| |
11229 |
| - | |
| 11232 | + | |
| 11233 | + | |
11230 | 11234 |
| |
11231 | 11235 |
| |
11232 |
| - | |
| 11236 | + | |
| 11237 | + | |
| 11238 | + | |
| 11239 | + | |
11233 | 11240 |
| |
11234 | 11241 |
| |
11235 | 11242 |
| |
11236 | 11243 |
| |
11237 | 11244 |
| |
11238 |
| - | |
| 11245 | + | |
| 11246 | + | |
11239 | 11247 |
| |
11240 | 11248 |
| |
11241 |
| - | |
| 11249 | + | |
| 11250 | + | |
| 11251 | + | |
| 11252 | + | |
11242 | 11253 |
| |
11243 | 11254 |
| |
11244 | 11255 |
| |
11245 | 11256 |
| |
11246 | 11257 |
| |
11247 |
| - | |
| 11258 | + | |
| 11259 | + | |
11248 | 11260 |
| |
11249 | 11261 |
| |
11250 |
| - | |
| 11262 | + | |
| 11263 | + | |
| 11264 | + | |
| 11265 | + | |
11251 | 11266 |
| |
11252 | 11267 |
| |
11253 | 11268 |
| |
11254 | 11269 |
| |
11255 | 11270 |
| |
11256 |
| - | |
| 11271 | + | |
| 11272 | + | |
11257 | 11273 |
| |
11258 | 11274 |
| |
11259 | 11275 |
| |
11260 | 11276 |
| |
11261 | 11277 |
| |
11262 | 11278 |
| |
11263 | 11279 |
| |
11264 |
| - | |
| 11280 | + | |
| 11281 | + | |
11265 | 11282 |
| |
11266 | 11283 |
| |
11267 | 11284 |
| |
11268 | 11285 |
| |
11269 | 11286 |
| |
11270 | 11287 |
| |
11271 |
| - | |
| 11288 | + | |
| 11289 | + | |
11272 | 11290 |
| |
11273 | 11291 |
| |
11274 | 11292 |
| |
11275 | 11293 |
| |
11276 | 11294 |
| |
11277 | 11295 |
| |
11278 |
| - | |
| 11296 | + | |
| 11297 | + | |
11279 | 11298 |
| |
11280 | 11299 |
| |
11281 | 11300 |
| |
11282 | 11301 |
| |
11283 | 11302 |
| |
11284 | 11303 |
| |
11285 |
| - | |
| 11304 | + | |
| 11305 | + | |
11286 | 11306 |
| |
11287 | 11307 |
| |
11288 | 11308 |
| |
| |||
11450 | 11470 |
| |
11451 | 11471 |
| |
11452 | 11472 |
| |
11453 |
| - | |
| 11473 | + | |
11454 | 11474 |
| |
11455 | 11475 |
| |
11456 | 11476 |
| |
| |||
11471 | 11491 |
| |
11472 | 11492 |
| |
11473 | 11493 |
| |
11474 |
| - | |
11475 |
| - | |
11476 |
| - | |
| 11494 | + | |
| 11495 | + | |
| 11496 | + | |
11477 | 11497 |
| |
11478 | 11498 |
| |
11479 | 11499 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
182 | 182 |
| |
183 | 183 |
| |
184 | 184 |
| |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
185 | 191 |
| |
186 | 192 |
| |
187 | 193 |
| |
| |||
1648 | 1654 |
| |
1649 | 1655 |
| |
1650 | 1656 |
| |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
1651 | 1663 |
| |
1652 | 1664 |
| |
1653 | 1665 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
233 | 233 |
| |
234 | 234 |
| |
235 | 235 |
| |
| 236 | + | |
| 237 | + | |
| 238 | + | |
236 | 239 |
| |
237 | 240 |
| |
238 | 241 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
994 | 994 |
| |
995 | 995 |
| |
996 | 996 |
| |
997 |
| - | |
998 | 997 |
| |
999 | 998 |
| |
1000 | 999 |
| |
|
0 commit comments
Comments
(0)