Re: question about plpgsql replace function - Mailing list pgsql-general

From Michael Fuhr
Subject Re: question about plpgsql replace function
Date
Msg-id 20050819164038.GA91865@winnie.fuhr.org
Whole thread Raw
In response to question about plpgsql replace function  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
List pgsql-general
On Fri, Aug 19, 2005 at 11:11:31AM -0500, Tony Caduto wrote:
> I want to replace the CRLF with  a comma so I can use the email
> addresses in another app, so I thought I would do this:
>
> thearray = replace(mandi_notifications,'/r/n',',');
>
> but it does not work.

Your slashes are leaning the wrong direction.  Try this:

thearray := replace(mandi_notifications, '\r\n', ',');

Sometimes the number of backslashes (\) matters; see "Tips for
Developing in PL/pgSQL" in the documentation for discussion.

--
Michael Fuhr

pgsql-general by date:

Previous
From: Eugene
Date:
Subject: Re: total db lockup
Next
From: Tom Lane
Date:
Subject: Re: total db lockup