Re: escape_string_warning doesn't work - Mailing list pgsql-novice

From Michael Fuhr
Subject Re: escape_string_warning doesn't work
Date
Msg-id 20060310180726.GA16794@winnie.fuhr.org
Whole thread Raw
In response to escape_string_warning doesn't work  ("Tjibbe Rijpma" <tjibbe@hotmail.com>)
List pgsql-novice
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

pgsql-novice by date:

Previous
From: "Tjibbe Rijpma"
Date:
Subject: escape_string_warning doesn't work
Next
From: Miguel
Date:
Subject: How can I make multiple insertions ?