Re: replace text function - Mailing list pgsql-general

From Lee Kindness
Subject Re: replace text function
Date
Msg-id 15818.13271.974844.66369@kelvin.csl.co.uk
Whole thread Raw
In response to Re: replace text function  ("Mark Wilson" <mark@mediasculpt.com>)
List pgsql-general
I know you're sorted with a solution, but the responses must have been
off-list. For the record, and to point others to useful additional
functionality the PostgreSQL Cookbook is always useful and has a
REPLACE function:

 http://www.brasileiro.net/postgres/cookbook/
 http://www.brasileiro.net:8080/postgres/cookbook/view-one-recipe.adp?recipe_id=8886

Lee.

Mark Wilson writes:
 > Must be a slow posting day today :~)
 >
 > Thanks everyone.  I'm running PostGreSQL 7.2.1 and have run in the replace
 > function that numerous people sent me.  It works exactly as I would expect
 > it to.
 >
 > > Mark Wilson wrote:
 > > > Hi all,
 > > >
 > > > I'm trying to find a function that will replace one word with another in
 > a
 > > > string.
 > > >
 > > > e.g. select <replace function>('bob was here, bobina wasnt', 'bob',
 > 'mike');
 > > > will return "mike was here, mikeina wasnt"
 > > >
 > > > Is there such a function already written in PostGreSQL?
 > > >

pgsql-general by date:

Previous
From: Florian Litot
Date:
Subject: trace
Next
From: Richard Huxton
Date:
Subject: Re: primary key question