Re: Looking for "proper" escape string syntax from pg_get_constraintdef

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Looking for "proper" escape string syntax from pg_get_constraintdef
Дата
Msg-id 2538.1251733240@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Looking for "proper" escape string syntax from pg_get_constraintdef  (Marc Munro <marc@bloodnok.com>)
Список pgsql-general
Marc Munro <marc@bloodnok.com> writes:
> but retrieving the constraint definition using pg_get_constraintdef(oid)
> gives me this:

>   CHECK (((VALUE ~ '^\\d{4}$'::text) OR (VALUE ~ '^\\d{5}-\\d{4}$'::text)))

> How can I get the constraint definition with proper escaping from the
> catalog?  Is there another function I should be using?

pg_dump just turns off that warning.  The string is correct for the
prevailing value of standard_conforming_strings; the warning is useless
noise as long as you're careful about maintaining that setting.

            regards, tom lane

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

Предыдущее
От: Marc Munro
Дата:
Сообщение: Looking for "proper" escape string syntax from pg_get_constraintdef
Следующее
От: David Kerr
Дата:
Сообщение: Re: Audit Trigger puzzler