Re: [HACKERS] another locale problem

Поиск
Список
Период
Сортировка
От Daniel Kalchev
Тема Re: [HACKERS] another locale problem
Дата
Msg-id 199906111038.NAA28105@dcave.digsys.bg
обсуждение исходный текст
Ответ на Re: [HACKERS] another locale problem  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
>>>Tatsuo Ishii said:> >This worked, however it made all selects of ~* '^sometext' sequential.> > That's correct
behavior.>> >Why can't we use index searches in this case? I believe it is :-)> > No. It's due to the nature of the
Btreeindex.
 

But why it did use index scan when the case of the field and the expression 
matched and did find the correct results?
> >But this> >> >SELECT key FROM t WHERE key ~* '^ sometext';> > Again, that should not be index scan.

SELECT key FROM t WHERE key ~* '^ ';

(space only) uses index and works correctly.... weird!
> BTW, if you want to play with regex, you might find retest.c be> useful. You can build the test tool by:> > make
retest>> enjoy:-)
 


In a wild guess I changed all 'char' to 'unsigned char' in regcomp.c, with no 
positive or negative results. Maybe there are other places in regex where this 
should be done, such as regexec.c? Is there an regex guru over here ... :-)

My long-time wondering about regex in Postgres has always been - isn't there 
something better than this old regex code that we can use?

Daniel



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

Предыдущее
От: Vadim Mikheev
Дата:
Сообщение: Re: [HACKERS] Beta4 Available ...
Следующее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] postgres processes