Escaping \n - Mailing list pgsql-general

From Terry Lee Tucker
Subject Escaping \n
Date
Msg-id 200803281706.10478.terry@chosen-ones.org
Whole thread Raw
Responses Re: Escaping \n
List pgsql-general
Greetings:

We are moving our application from 7.4.14 to 8.3.1. One giant step for
mankind...
Anyay, I have several triggers that update notes fields in certain tables and
loading the trigger function is giving me the following error:

psql:bill/bill_preupd_func.plsql:83: WARNING:  nonstandard use of escape in a
string literal
LINE 1: ...OR REPLACE FUNCTION bill_preupd_func () RETURNS TRIGGER AS '
                                                                      ^
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.

Thanks...

Thanks...
--
Terry Lee Tucker
Turbo's IT Manager
Turbo, division of Ozburn-Hessey Logistics
2251 Jesse Jewell Pkwy NE
Gainesville, GA 30501
Tel: (336) 372-6812  Fax: (336) 372-6812  Cell: (336) 404-6987
terry@turbocorp.com
www.turbocorp.com

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: Out of memory
Next
From: Alex Adriaanse
Date:
Subject: Re: Out of memory