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?
> > >