Support LIKE and ILIKE index searches via contrib/pg_trgm indexes. Unlike Btree-based LIKE optimization, this works for non-left-anchored search patterns. The effectiveness of the search depends on how many trigrams can be extracted from the pattern. (The worst case, with no trigrams, degrades to a full-table scan, so this isn't a panacea. But it can be very useful.)
Alexander Korotkov, reviewed by Jan Urbanski Branch ------ master Details ------- http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=6e2f3ae8842392c46ccc91a9ce4bba92296890cb Modified Files -------------- contrib/pg_trgm/expected/pg_trgm.out | 90 ++++++++++ contrib/pg_trgm/pg_trgm.sql.in | 16 ++- contrib/pg_trgm/sql/pg_trgm.sql | 25 +++ contrib/pg_trgm/trgm.h | 22 ++- contrib/pg_trgm/trgm_gin.c | 132 ++++++++++++++-- contrib/pg_trgm/trgm_gist.c | 95 ++++++++++-- contrib/pg_trgm/trgm_op.c | 286 +++++++++++++++++++++++++++++++-- contrib/pg_trgm/uninstall_pg_trgm.sql | 6 +- doc/src/sgml/pgtrgm.sgml | 18 ++- 9 files changed, 640 insertions(+), 50 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers