"surabhi.ahuja" <surabhi.ahuja@iiitb.ac.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