Re: Checking regex pattern validity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Checking regex pattern validity
Дата
Msg-id 3231.1095257327@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Checking regex pattern validity  (David Garamond <lists@zara.6.isreserved.com>)
Ответы Re: Checking regex pattern validity
Список pgsql-general
David Garamond <lists@zara.6.isreserved.com> writes:
> Is there a function like IS_VALID_REGEX() to check whether a pattern is
> valid (i.e. it compiles)? I'm storing a list of regex patterns in a
> table. It would be nice to be able to add a CHECK constraint to ensure
> that all the regexes are valid.

    ... CHECK (('' ~ pattern) IS NOT NULL) ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Rollback on Error
Следующее
От: John Sidney-Woollett
Дата:
Сообщение: psql + autocommit