postgresql/contrib/pg_trgm
Tom Lane 9728eda792 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.
2013-02-13 14:07:06 -05:00
..
data
expected Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:06 -05:00
sql Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:06 -05:00
.gitignore
Makefile
pg_trgm--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
pg_trgm--unpackaged--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
pg_trgm.control
trgm_gin.c Remove unnecessary #include references, per pgrminclude script. 2011-09-01 10:04:27 -04:00
trgm_gist.c Replace int2/int4 in C code with int16/int32 2012-06-25 01:51:46 +03:00
trgm_op.c Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:06 -05:00
trgm.h Remove many -Wcast-qual warnings 2011-09-11 21:54:32 +03:00