Search Postgresql Archives

Re: Escaping \n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 28, 2008 at 05:06:10PM -0400, Terry Lee Tucker wrote:
> HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
> 
> The problem is a line like 'UPDATE bill SET notes = 'blah, blah, yea\nmore 
> stuff';
> 
> How to I escape the newline embeded in the string? I've tried the advice from 
> HINT, but have been unable to get it to work.

The statement would become:

  UPDATE bill SET notes = E'blah, blah, yea\nmore stuff';

Is this what you tried? I couldn't tell from your message.  If you did,
then maybe your database drivers are somehow mangling the statement
somewhere between your code and the database.  You could try running it
locally from inside psql to find out.


  Sam

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux