forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit849172f
committed
btree_gin: Fix calculation of leftmost interval value.
Formerly, the value computed by leftmostvalue_interval() was a longway short of the minimum possible interval value. As a result, anindex scan on a GIN index on an interval column with < or <= operatorswould miss large negative interval values.Fix by setting all fields of the leftmost interval to their minimumvalues, ensuring that the result is less than any other possibleinterval. Since this only affects index searches, no index rebuild isnecessary.Back-patch to all supported branches.Dean Rasheed, reviewed by Heikki Linnakangas.Discussion:https://postgr.es/m/CAEZATCV80%2BgOfF8ehNUUfaKBZgZMDfCfL-g1HhWGb6kC3rpDfw%40mail.gmail.com1 parent237f876 commit849172f
File tree
3 files changed
+17
-9
lines changed- contrib/btree_gin
- expected
- sql
3 files changed
+17
-9
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
306 | 306 |
| |
307 | 307 |
| |
308 | 308 |
| |
309 |
| - | |
310 |
| - | |
311 |
| - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
312 | 312 |
| |
313 | 313 |
| |
314 | 314 |
| |
|
Lines changed: 11 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| 6 | + | |
6 | 7 |
| |
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
11 |
| - | |
| 12 | + | |
| 13 | + | |
12 | 14 |
| |
13 | 15 |
| |
14 | 16 |
| |
15 | 17 |
| |
16 | 18 |
| |
| 19 | + | |
17 | 20 |
| |
18 | 21 |
| |
19 | 22 |
| |
20 |
| - | |
| 23 | + | |
21 | 24 |
| |
22 | 25 |
| |
23 | 26 |
| |
24 | 27 |
| |
| 28 | + | |
25 | 29 |
| |
26 | 30 |
| |
27 | 31 |
| |
28 | 32 |
| |
29 |
| - | |
| 33 | + | |
30 | 34 |
| |
31 | 35 |
| |
32 | 36 |
| |
| |||
40 | 44 |
| |
41 | 45 |
| |
42 | 46 |
| |
43 |
| - | |
| 47 | + | |
| 48 | + | |
44 | 49 |
| |
45 | 50 |
| |
46 | 51 |
| |
47 | 52 |
| |
48 | 53 |
| |
49 | 54 |
| |
50 |
| - | |
| 55 | + | |
| 56 | + | |
51 | 57 |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
| 8 | + | |
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
13 |
| - | |
| 14 | + | |
| 15 | + | |
14 | 16 |
| |
15 | 17 |
| |
16 | 18 |
| |
|
0 commit comments
Comments
(0)