Marc Munro <marc(at)bloodnok(dot)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