Re: replace text function
От | Mark Wilson |
---|---|
Тема | Re: replace text function |
Дата | |
Msg-id | 053901c28611$05ab3eb0$3301a8c0@merl обсуждение исходный текст |
Ответ на | Re: i have got an error ("scott.marlowe" <scott.marlowe@ihs.com>) |
Ответы |
Re: replace text function
|
Список | pgsql-general |
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. Cheers, Mark ----- Original Message ----- From: "Joe Conway" <mail@joeconway.com> To: "Mark Wilson" <mark@mediasculpt.com> Cc: <pgsql-general@postgresql.org> Sent: Thursday, November 07, 2002 11:51 AM Subject: Re: [GENERAL] replace text function > 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? > > > > It is new in 7.3 (currently in beta). See the function called "replace" at: > http://developer.postgresql.org/docs/postgres/functions-string.html > > test=# select replace('bob was here, bobina wasnt', 'bob', 'mike'); > replace > ------------------------------ > mike was here, mikeina wasnt > (1 row) > > > HTH, > > Joe > > >
В списке pgsql-general по дате отправления: