Re: [SQL] Using escape strings in an insert statement.

2007-07-03 Thread Michael Glaesemann
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, tha

Re: [SQL] Using escape strings in an insert statement.

2007-07-03 Thread Erik Jones
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' beingi

Re: [SQL] Using escape strings in an insert statement.

2007-07-02 Thread Michael Glaesemann
On Jul 2, 2007, at 18:26 , Paul Lambert wrote: Looks like it's a toss-up between turning standard_conforming_strings on or turning escape_string_warning off, both seem to have the same effect in not giving the error anymore. A warning is not an error :) Michael Glaesemann grzm seespotco

Re: [SQL] Using escape strings in an insert statement.

2007-07-02 Thread Paul Lambert
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'); The help itself (ch 4.1.2.1) tells me to use double backslash "Thus, to include a ba

Re: [SQL] Using escape strings in an insert statement.

2007-07-02 Thread Michael Glaesemann
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'); The help itself (ch 4.1.2.1) tells me to use double backslash "Thus, to include a backslash character, write t

[SQL] Using escape strings in an insert statement.

2007-07-02 Thread Paul Lambert
I'm having a little glitch in using escape strings within strings. The following will best explain my issue: tester=# create table testing (test_text text); CREATE TABLE tester=# insert into testing (test_text) values ('abc\\123'); WARNING: nonstandard use of \\ in a string literal LINE 1: ins