"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