If I run the following query in Postgres or Snowflake, it will remove test
from the end of the input string, even though the trimming text is best
:
SELECT rtrim('rtrimtest', 'best');
See:
https://www.db-fiddle.com/f/kKYwe5tNLpVoacM2q1nJY7/0
However, I need to rtrim to only remove if the trimming text is an exact match. How do I do that?