Re: Using escape strings in an insert statement. - Mailing list pgsql-sql

From Michael Glaesemann
Subject Re: Using escape strings in an insert statement.
Date
Msg-id 4A068101-E181-4183-BB4D-44243B344F22@seespotcode.net
Whole thread Raw
In response to Re: Using escape strings in an insert statement.  (Erik Jones <erik@myemma.com>)
List pgsql-sql
On Jul 3, 2007, at 10:49 , Erik Jones wrote:

> On Jul 2, 2007, at 6:11 PM, Michael Glaesemann wrote:
>
>>
>> On Jul 2, 2007, at 17:45 , Paul Lambert wrote:
>>
>>> tester=# insert into testing (test_text) values ('abcE'\\'123');
>>
>> This should be
>> INSERT INTO testing (test_text) values (E'abc\123');
>
> No, that will leave him with the string 'abc23' beinginserted, he  
> wants the backslash to be included in the string, that's why he had  
> two, so it should be:
>
> INSERT INTO testing (test_text) values (E'abc\\123');

Ah, right. Thanks for the correction, Erik.

Michael Glaesemann
grzm seespotcode net




pgsql-sql by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Informix Schema -> PostgreSQL ?
Next
From: Bob Singleton
Date:
Subject: Iterate and write a previous row to a temp table?