On Fri, Mar 10, 2006 at 06:24:59PM +0100, Tjibbe Rijpma wrote:
> I tried the option escape_string_warning, but why it doesn't get a warning
> with the following code:
>
> SET escape_string_warning TO on;
> CREATE DOMAIN email AS character varying(50) CHECK (((VALUE)::text ~
> '^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([.-][a-z0-9]+)*)+\\.[a-z]{2,}$'::t
> ext));
I get the warning here in 8.1.3.
test=> SET escape_string_warning TO on;
SET
test=> CREATE DOMAIN email AS ... [same as above]
WARNING: nonstandard use of \\ in a string literal at character 70
HINT: Use the escape string syntax for backslashes, e.g., E'\\'.
CREATE DOMAIN
What client are you using? Version of PostgreSQL? What's your
client_min_messages setting?
--
Michael Fuhr