forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf73a163
committed
Fix contrib/pg_trgm's similarity() function for trigram-free strings.
Cases such as similarity('', '') produced a NaN result due to computing0/0. Per discussion, make it return zero instead.This appears to be the basic cause of bug #7867 from Michele Baravalle,although it remains unclear why her installation doesn't think Cyrillicletters are letters.Back-patch to all active branches.1 parent52c889e commitf73a163
3 files changed
+14
-2
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 |
| |
57 | 63 |
| |
58 | 64 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| 14 | + | |
| 15 | + | |
14 | 16 |
| |
15 | 17 |
| |
16 | 18 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
554 | 554 |
| |
555 | 555 |
| |
556 | 556 |
| |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
557 | 561 |
| |
558 | 562 |
| |
559 | 563 |
| |
| |||
571 | 575 |
| |
572 | 576 |
| |
573 | 577 |
| |
574 |
| - | |
| 578 | + | |
575 | 579 |
| |
576 |
| - | |
| 580 | + | |
577 | 581 |
| |
578 | 582 |
| |
579 | 583 |
| |
|
0 commit comments
Comments
(0)