Re: pg_trgm

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tatsuo Ishii <ishii@sraoss.co.jp>
Cc: ishii@postgresql.org, andres@anarazel.de, pgsql-hackers@postgresql.org, teodor@sigaev.ru
Date: 2010-05-27T14:24:16Z
Lists: pgsql-hackers
Tatsuo Ishii <ishii@sraoss.co.jp> writes:
> Anyway locale is completely usesless for finding word vs non-character
> an agglutinative language such as Japanese.

Well, that doesn't mean that the answer is to use C locale ;-)

However, you could possibly think about making this bit of code
more flexible:

#ifdef KEEPONLYALNUM
#define iswordchr(c)	(t_isalpha(c) || t_isdigit(c))
#else
#define iswordchr(c)	(!t_isspace(c))
#endif

Currently it seems to be hard-wired to the first case in standard
builds.

			regards, tom lane