Re: replace text function

From: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
To: "Mark Wilson" <mark(at)mediasculpt(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>, Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Subject: Re: replace text function
Date: 2002-11-07 09:35:19
Message-ID: 15818.13271.974844.66369@kelvin.csl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?
> > >

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hervé Piedvache 2002-11-07 09:38:18 Failed to initialize lc_messages 7.3b5
Previous Message Florian Litot 2002-11-07 09:04:12 trace