- Notifications
You must be signed in to change notification settings - Fork5
Commit25549ed
committed
Fix equivclass.c's not-quite-right strategy for handling X=X clauses.
The original coding correctly noted that these aren't just redundancies(they're effectively X IS NOT NULL, assuming = is strict). However, theygot treated that way if X happened to be in a single-member EquivalenceClassalready, which could happen if there was an ORDER BY X clause, for instance.The simplest and most reliable solution seems to be to not try to processsuch clauses through the EquivalenceClass machinery; just throw them backfor traditional processing. The amount of work that'd be needed to besmarter than that seems out of proportion to the benefit.Per bug #5084 from Bernt Marius Johnsen, and analysis by Andrew Gierth.1 parent176c3c8 commit25549ed
File tree
4 files changed
+44
-10
lines changed- src
- backend/optimizer
- path
- test/regress
- expected
- sql
4 files changed
+44
-10
lines changedLines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
481 | 481 |
| |
482 | 482 |
| |
483 | 483 |
| |
484 |
| - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
485 | 488 |
| |
486 | 489 |
| |
487 | 490 |
| |
|
Lines changed: 18 additions & 8 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 |
| |
| |||
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
117 | 130 |
| |
118 | 131 |
| |
119 | 132 |
| |
| |||
152 | 165 |
| |
153 | 166 |
| |
154 | 167 |
| |
155 |
| - | |
156 |
| - | |
157 |
| - | |
158 |
| - | |
159 |
| - | |
160 |
| - | |
161 |
| - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
162 | 172 |
| |
163 | 173 |
| |
164 | 174 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
768 | 768 |
| |
769 | 769 |
| |
770 | 770 |
| |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + |
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
202 | 202 |
| |
203 | 203 |
| |
204 | 204 |
| |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + |
0 commit comments
Comments
(0)