- Notifications
You must be signed in to change notification settings - Fork5
Commit670a6c7
committed
Fix grammar for subscripting or field selection from a sub-SELECT result.
Such cases should work, but the grammar failed to accept them because ofour ancient precedence hacks to convince bison that extra parenthesesaround a sub-SELECT in an expression are unambiguous. (Formally, they*are* ambiguous, but we don't especially care whether they're treated aspart of the sub-SELECT or part of the expression. Bison cares, though.)Fix by adding a redundant-looking production for this case.This is a fine example of why fixing shift/reduce conflicts viaprecedence declarations is more dangerous than it looks: you can easilycause the parser to reject cases that should work.This has been wrong since commit3db4056or maybe before, and apparently some people have been working around itby inserting no-op casts. That method introduces a dump/reload hazard,as illustrated in bug #7838 from Jan Mate. Hence, back-patch to allactive branches.1 parent574f764 commit670a6c7
File tree
3 files changed
+93
-0
lines changed- src
- backend/parser
- test/regress
- expected
- sql
3 files changed
+93
-0
lines changedLines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10839 | 10839 |
| |
10840 | 10840 |
| |
10841 | 10841 |
| |
| 10842 | + | |
| 10843 | + | |
| 10844 | + | |
| 10845 | + | |
| 10846 | + | |
| 10847 | + | |
| 10848 | + | |
| 10849 | + | |
| 10850 | + | |
| 10851 | + | |
| 10852 | + | |
| 10853 | + | |
| 10854 | + | |
| 10855 | + | |
| 10856 | + | |
| 10857 | + | |
| 10858 | + | |
| 10859 | + | |
| 10860 | + | |
| 10861 | + | |
| 10862 | + | |
| 10863 | + | |
| 10864 | + | |
10842 | 10865 |
| |
10843 | 10866 |
| |
10844 | 10867 |
| |
|
Lines changed: 55 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
20 | 75 |
| |
21 | 76 |
| |
22 | 77 |
| |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
11 | 26 |
| |
12 | 27 |
| |
13 | 28 |
| |
|
0 commit comments
Comments
(0)