title: Find sub string position from the end of string in PostgreSQL
body: <p>I have this query which finds the position of sub string.</p>
  
  <pre><code>select position('-' || lower('i') in lower('GFT-iMB5-i'))
  </code></pre>
  
  <p>(this is an example it actually uses function variables to replace the strings)</p>
  
  <p>This return <code>4</code> </p>
  
  <p>In a nut shell I want it to begin from the end of the string and not from the start.
  meaning I want to get: <code>9</code></p>
  
  <p>How can I do that?</p>