Re: Regexp match not working.. (SQL help)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regexp match not working.. (SQL help)
Дата
Msg-id 28564.1305129360@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Regexp match not working.. (SQL help)  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Список pgsql-general
Phoenix Kiula <phoenix.kiula@gmail.com> writes:
> I am using this SQL:

>    SELECT id FROM table1
>    WHERE   mytext   ~*   E'sub1|sub2|sub3|sub4...'
>    LIMIT 10;

> This is basically working, but some of the "mytext" columns being
> returned that do not contain any of these substrings.

[ raised eyebrow... ]  Could we see a concrete example?

One potential issue is that, depending on which PG version and locale
and database encoding you are using, case-insensitive matching might
not work properly on non-ASCII letters.  Other than that, the only
gotcha I can think of is having regexp special characters in the
substrings and failing to escape them properly.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Custom types and JDBC
Следующее
От: Stanislav Raskin
Дата:
Сообщение: Re: full text search to_tsquery performance with ispell dictionary