backslashes in 8.3.3 - Mailing list pgsql-general

From Brandon Metcalf
Subject backslashes in 8.3.3
Date
Msg-id Pine.LNX.4.58L.0806240909510.9186@cash.us.nortel.com
Whole thread Raw
Responses Re: backslashes in 8.3.3  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: backslashes in 8.3.3  ("Brandon Metcalf" <bmetcalf@nortel.com>)
List pgsql-general
I just upgraded to 8.3.3 from 8.1.5 and noticed that backslashes are
handled completely differently now.  For example,

  db=# insert into junk (cifs) values ('\\foooo\bar');
  WARNING:  nonstandard use of \\ in a string literal
  LINE 1: insert into junk (cifs) values ('\\foooo\bar');
                                          ^
  HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
  INSERT 0 1
  db=# select * from junk;
       cifs
  --------------
   \foooo\x08ar
  (1 row)

Is there anyway to disable this behavior or fix this on the server
side?  I really don't want to have to rework all of our code that
inserts or queries data.

It seems this works,

  db=# insert into junk (cifs) values (E'\\\\foobar\\bar');
  INSERT 0 1



--
Brandon

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bulk load data from one table to another
Next
From: Tom Lane
Date:
Subject: Re: backslashes in 8.3.3