regexp_replace

Поиск
Список
Период
Сортировка
От polen.t2006@freenet.de
Тема regexp_replace
Дата
Msg-id 1185202235.569654.243430@n2g2000hse.googlegroups.com
обсуждение исходный текст
Ответы Re: regexp_replace  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: regexp_replace  (Michael Fuhr <mike@fuhr.org>)
Re: regexp_replace  (Perry Smith <pedz@easesoftware.com>)
Список pgsql-general
Hi all,

I would like to change a sub-string in a text-field by using

UPDATE tablename SET
fieldname=regexp_replace(fieldname,old_sub_string,new_sub_string)
WHERE (fieldname like '%old_sub_string%')

In priniciple, it works. However, only one occurence of old_sub_string
is replaced and further not. Which syntax has to be used to replace
all old_sub_strings by new_sub_string in a text-field at once? I have
seen something like '\&' in the docs and tried it, but I failed.

Any Idea? Thanks a lot!

Ciao,
Tino


В списке pgsql-general по дате отправления:

Предыдущее
От: "Sibte Abbas"
Дата:
Сообщение: Re: [HACKERS] 8.2.4 signal 11 with large transaction
Следующее
От: "Andrus"
Дата:
Сообщение: Re: invalid memory alloc request size 2147483648 using toode LIKE 'ä%'