postgresql string processing function

Delete the specified characters at the beginning/end/end of the string

trim([leading | trailing | both] [characters] from string)

Example

select trim(both 'x' from 'xx123xxx456xxx')
select trim(leading 'x' from 'xx123xxx456xxx')
select trim(trailing 'x' from 'xx123xxx456xxx')

Guess you like

Origin blog.csdn.net/leinminna/article/details/113875751