Re: question about plpgsql replace function

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: question about plpgsql replace function
Date: 2005-08-19 16:40:38
Message-ID: 20050819164038.GA91865@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-08-19 17:02:16 Re: total db lockup
Previous Message Eugene 2005-08-19 16:39:58 Re: total db lockup