Re: pg_trgm

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: pg_trgm
Дата
Msg-id 20100529.171328.20490849.t-ishii@sraoss.co.jp
обсуждение исходный текст
Ответ на Re: pg_trgm  (Tatsuo Ishii <ishii@postgresql.org>)
Ответы Re: pg_trgm  (Greg Stark <gsstark@mit.edu>)
Re: pg_trgm  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> > It's not a practical solution for people working with prebuilt Postgres
> > versions, which is most people.  I don't object to finding a way to
> > provide a "not-space" behavior instead of an "is-alnum" behavior,
> > but as noted upthread a GUC isn't the right way.  How do you feel
> > about a new set of functions with an additional flag argument of
> > some sort?
> 
> Let me see how many functions we need to create...

After thinking a little bit more, I think following patch would not
break existing behavior and also adopts mutibyte + C locale case. What
do you think?

*** trgm_op.c~    2009-06-11 23:48:51.000000000 +0900
--- trgm_op.c    2010-05-29 17:07:28.000000000 +0900
***************
*** 59,65 **** }  #ifdef KEEPONLYALNUM
! #define iswordchr(c)    (t_isalpha(c) || t_isdigit(c)) #else #define iswordchr(c)    (!t_isspace(c)) #endif
--- 59,67 ---- }  #ifdef KEEPONLYALNUM
! #define iswordchr(c)    (lc_ctype_is_c()? \
!                                 ((*(c) & 0x80)? !t_isspace(c) : (t_isalpha(c) || t_isdigit(c))) : \
!                                 (t_isalpha(c) || t_isdigit(c))) #else #define iswordchr(c)    (!t_isspace(c)) #endif


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Failback with log shipping
Следующее
От: Jesper Krogh
Дата:
Сообщение: Re: tsvector pg_stats seems quite a bit off.