Re: KEEPONLYALNUM for pg_trgm is not documented

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: KEEPONLYALNUM for pg_trgm is not documented
Date: 2011-03-11 15:46:48
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com> writes:
> contrib/pg_trgm in 9.1 becomes more attractive feature by index supports
> for LIKE operators, but only alphabet and numeric characters are indexed
> by default. But, we can modify KEEPONLYALNUM in the source code to
> keep all characters in n-gram words.

> However, the limitation and KEEPONLYALNUM are not documented in the page:

> An additonal documentation patches acceptable? The issues would be a FAQ for
> non-English users. I heard that pg_trgm will be one of the *killer features*
> of 9.1 in Japan, where N-gram based text search is preferred.

I'm not sure it's really a great idea to encourage people to use custom
builds with modified versions of that symbol. And those not using
custom builds will just be frustrated. If we think this is an important
feature then we ought to work out a better way to expose the

(Personally I wonder how useful pg_trgm is at all in multibyte
encodings. Its idea of a trigram is 3 bytes, not 3 characters...)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2011-03-11 15:48:59 Re: Flex output missing from 9.1a4 tarballs?
Previous Message Heikki Linnakangas 2011-03-11 15:45:16 Re: Flex output missing from 9.1a4 tarballs?