Is there an easy way to normalize-space with given string functions

Поиск
Список
Период
Сортировка
От Janning Vygen
Тема Is there an easy way to normalize-space with given string functions
Дата
Msg-id 200404230059.14221.vygen@gmx.de
обсуждение исходный текст
Ответы Re: Is there an easy way to normalize-space with given string functions
Список pgsql-sql
Hi,

i am looking for something like

$ SELECT btrim(replace(' too   many   spaces!  ', '\s+',' '), '');
too many spaces

i searched the function list and tried to combine to or more functions, but i 
miss a replace function which uses regular expressions.

Do i have to write my own function or did i miss something? trimming is well 
supported at the start and end of string, but no trimmin in the middle seems 
to be possible.

kind regards
janning



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: lifetime of temp schema versus compiled image of plpgsql proc
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: lifetime of temp schema versus compiled image of plpgsql proc