Re: [GENERAL] Looking for "proper" escape string syntax from pg_get_constraintdef

2009-08-31 Thread Tom Lane
Marc Munro 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 functi

[GENERAL] Looking for "proper" escape string syntax from pg_get_constraintdef

2009-08-31 Thread Marc Munro
I am trying to recreate a domain definition from information in pg_catalog and getting the following warnings: WARNING: nonstandard use of \\ in a string literal LINE 3: CHECK (((VALUE ~ '^\\d{4}$'::text) OR (VALUE ~ '^\\d{5}-\\... ^ HINT: Use the escape strin