Re: Removing spaces

Поиск
Список
Период
Сортировка
От Ed L.
Тема Re: Removing spaces
Дата
Msg-id 200302191126.07812.pgsql@bluepolka.net
обсуждение исходный текст
Ответ на Removing spaces  (Dave Smith <dave.smith@candata.com>)
Список pgsql-general
On Wednesday February 19 2003 11:19, Dave Smith wrote:
> I have a field of type text that has a value like
>
> 'hello   \nworld   \n'
>
> I would like to remove the trailing blanks between the last
> character and the newline. I would like to use replace with a regx
> like /[ ]+\n/\n/ but it does not seem to work.

You might try combining UPDATE with some of the string functions;
trim() + '\n' comes to mind.

http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/functions-string.html

Ed


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

Предыдущее
От: Dave Smith
Дата:
Сообщение: Removing spaces
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: creating table