diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-02-13 14:07:06 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-02-13 14:07:06 -0500 |
commit | 9728eda7925b6d42621b38c48e91ef9ab8d90cbc (patch) | |
tree | 5f36156374357ff9251c15acdc838b35784c9ade /src/backend/utils/adt/enum.c | |
parent | cd89965aab34463252b9354bc1bf1bcf0339c102 (diff) | |
download | postgresql-9728eda7925b6d42621b38c48e91ef9ab8d90cbc.tar.gz postgresql-9728eda7925b6d42621b38c48e91ef9ab8d90cbc.zip |
Fix contrib/pg_trgm's similarity() function for trigram-free strings.
Cases such as similarity('', '') produced a NaN result due to computing
0/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 Cyrillic
letters are letters.
Back-patch to all active branches.
Diffstat (limited to 'src/backend/utils/adt/enum.c')
0 files changed, 0 insertions, 0 deletions