title: Trimming trailing string removes unmatched values
body: <p>I've a PostgreSQL table column with values ending in a particular string. i.e, <code>528144721634,</code>. I'm trying to trim the trailing string from the column using the following query.</p>
  <pre><code>select trim(trailing '528144721634,' from details) as details from tablename
  </code></pre>
  <p>This is working, but it is removing unmatched values also. I've values like <code>test string 313</code> in the details column, but this query is removing the trailing 313 also.</p>