Re: Postgresql: Remove last char in text-field if the column ends with minus sign

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: Postgresql: Remove last char in text-field if the column ends with minus sign
Дата
Msg-id 4D0A5422.2020108@pinpointresearch.com
обсуждение исходный текст
Ответ на Postgresql: Remove last char in text-field if the column ends with minus sign  (Sarang Dave <saranghdave@gmail.com>)
Список pgsql-general
On 12/16/2010 06:52 AM, Sarang Dave wrote:

Hello sir,

I want to remove the last char in a column if it ends with the minus sign. How could I do this in postgresql?

regexp_replace(your_field, '-+$', '');

Cheers,
Steve

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

Предыдущее
От: Vincent Veyron
Дата:
Сообщение: Re: Searing array fields - or should I redesign?
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: PgEast 2011: NYC CFP