Re: how to do a find and replace

Поиск
Список
Период
Сортировка
От Hélder M. Vieira
Тема Re: how to do a find and replace
Дата
Msg-id 06c001c5ebdc$d6d4cd10$580bfea9@hmv02
обсуждение исходный текст
Ответ на timestamp SQL question  (Brian Doyle <bdoyle@localmatters.com>)
Список pgsql-sql
> update media_instance set location=replace(location,'v.','')
> where location like '%/0/v.%'


For more complex search/replace operations, 8.1 provides an interesting 
function, named 'regexp_replace'.
It probably goes unnoticed because although there is a small reference in 
the manual in section 'E.1.3.6. Data Type and Function Changes'
(http://www.postgresql.org/docs/8.1/interactive/release.html#RELEASE-8-1) 
and a description in section '9.7.3 POSIX Regular expressions' 
(http://www.postgresql.org/docs/8.1/interactive/functions-matching.html), it 
isn't mentioned in section '9.4. String Functions and Operators' 
(http://www.postgresql.org/docs/8.1/interactive/functions-string.html).


Hélder M. Vieira










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

Предыдущее
От: Bricklen Anderson
Дата:
Сообщение: Re: how to do a find and replace
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: how to do a find and replace