Re: Quering by Regular Expressions stored in table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Quering by Regular Expressions stored in table
Дата
Msg-id 15094.1148400871@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Quering by Regular Expressions stored in table  (Allen Fair <dba@girders.org>)
Список pgsql-general
Allen Fair <dba@girders.org> writes:
> Hi! I have a table with a character column (called match_regex)
> containing a POSIX regular expression, hoping to have Postgres use it
> while evaluating the "where" predicate. The following error occurs:

> SELECT *
> from patterns
> where 'blah blah blah' ~ match_regex;

> ERROR:  invalid regular expression: quantifier operand invalid

This means there's at least one value in the column that's not a legal
regex (* at the front is one possible cause, IIRC).

            regards, tom lane

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

Предыдущее
От: Frederic Massot
Дата:
Сообщение: Re: To recover data corrupted
Следующее
От: Yonatan Ben-Nes
Дата:
Сообщение: Trying to update a box data type column