question about plpgsql replace function - Mailing list pgsql-general

From Tony Caduto
Subject question about plpgsql replace function
Date
Msg-id 430604B3.4090304@amsoftwaredesign.com
Whole thread Raw
In response to Re:  ("A. Kretschmer" <akretschmer@despammed.com>)
Responses Re: question about plpgsql replace function  (Tom Lane <tgl@sss.pgh.pa.us>)
Postgresql Function Language question  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Re: question about plpgsql replace function  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
Hi,
I have a text field that has some email addresses that are each on a new
line by a CRLF.

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.

Does anyone know if it is possible to replace a CRLF in a string with PG
built in functions?  I would rather not use Perl if possible.

Thanks,

Tony

pgsql-general by date:

Previous
From: Peter Fein
Date:
Subject: Re: plpython function with dictionary as function argument?
Next
From: Tom Lane
Date:
Subject: Re: How to cancel a query if SIGINT does not work?