postgresql/contrib/pg_trgm
Tom Lane 04d7fa5e31 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:22 -05:00
..
data trgm - Trigram matching for PostgreSQL 2004-05-31 17:18:12 +00:00
expected Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:22 -05:00
sql Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:22 -05:00
.gitignore Some more gitignore cleanups: cover contrib and PL regression test outputs. 2010-09-22 17:22:53 -04:00
Makefile Blank line Makefile cleanups. 2009-04-28 17:07:50 +00:00
pg_trgm.sql.in Mark contrib's GiST and GIN opclass support functions as STRICT, for safety. 2009-06-11 18:30:03 +00:00
trgm.h 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
trgm_gin.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
trgm_gist.c 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
trgm_op.c Fix contrib/pg_trgm's similarity() function for trigram-free strings. 2013-02-13 14:07:22 -05:00
uninstall_pg_trgm.sql Adjust the APIs for GIN opclass support functions to allow the extractQuery() 2009-03-25 22:19:02 +00:00