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

From Steve Crawford
Subject Re: Postgresql: Remove last char in text-field if the column ends with minus sign
Date
Msg-id 4D0A5422.2020108@pinpointresearch.com
Whole thread Raw
In response to Postgresql: Remove last char in text-field if the column ends with minus sign  (Sarang Dave <saranghdave@gmail.com>)
List 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 by date:

Previous
From: Vincent Veyron
Date:
Subject: Re: Searing array fields - or should I redesign?
Next
From: "Joshua D. Drake"
Date:
Subject: PgEast 2011: NYC CFP