Escaping \n

From: Terry Lee Tucker <terry(at)chosen-ones(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Escaping \n
Date: 2008-03-28 21:06:10
Message-ID: 200803281706.10478.terry@chosen-ones.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)turbocorp(dot)com
www.turbocorp.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex Adriaanse 2008-03-28 21:20:01 Re: Out of memory
Previous Message sam 2008-03-28 20:31:58 Re: Performance of update