title: how to calculate sum of numbers in a string in postgresql
body: <pre><code>1^1^1^5^1|1^1|1^1
  </code></pre>
  
  <p>Is there a simple way to add all above numbers in postgresql. I would like to write a function that takes above string and outputs 13.</p>