Re: r trim of characters other than space

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: r trim of characters other than space
Date: 2006-02-09 07:19:19
Message-ID: 27685.1139469559@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"surabhi.ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in> writes:
> i want to make the following check,
> if it is having carets in the end, then those carets be removed.
> so if i get a string like abc def^^^^
> i should be able to get abc def

Per SQL spec:

regression=# select trim(trailing '^' from 'abc def^^^^');
rtrim
---------
abc def
(1 row)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Presber 2006-02-09 08:57:40 referential integrity without trigger
Previous Message A. Kretschmer 2006-02-09 06:35:51 Re: r trim of characters other than space