Re: Looking for "proper" escape string syntax from pg_get_constraintdef
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: marc(at)bloodnok(dot)com
- Cc: pgsql-general(at)postgresql(dot)org
- Subject: Re: Looking for "proper" escape string syntax from pg_get_constraintdef
- Date: Mon, 31 Aug 2009 11:40:40 -0400
- Message-id: <2538.1251733240@sss.pgh.pa.us> <text/plain>
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
Home |
Main Index |
Thread Index