- Notifications
You must be signed in to change notification settings - Fork5
Commit5d3fcc4
committed
Bend parse location rules for the convenience of pg_stat_statements.
Generally, the parse location assigned to a multiple-token construct isthe location of its leftmost token. This commit breaks that rule forthe syntaxes TYPENAME 'LITERAL' and CAST(CONSTANT AS TYPENAME) --- theresulting Const will have the location of the literal string, not thetypename or CAST keyword. The cases where this matters are pretty thin onthe ground (no error messages in the regression tests change, for example),and it's unlikely that any user would be confused anyway by an error cursorpointing at the literal. But still it's less than consistent. The reasonfor changing it is that contrib/pg_stat_statements wants to know the parselocation of the original literal, and it was agreed that this is the leastunpleasant way to preserve that information through parse analysis.Peter Geoghegan1 parenta40fa61 commit5d3fcc4
1 file changed
+7
-7
lines changedLines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
280 | 280 |
| |
281 | 281 |
| |
282 | 282 |
| |
283 |
| - | |
284 |
| - | |
285 |
| - | |
286 |
| - | |
287 |
| - | |
288 |
| - | |
289 |
| - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
|
0 commit comments
Comments
(0)