title: Postgresql: How to sum the ASCII codes of characters in a column?
body: <p>Example setup:</p>
  
  <pre><code>CREATE TABLE tbl (word TEXT);
  INSERT INTO tbl VALUES ('abc');
  INSERT INTO tbl VALUES ('def');
  </code></pre>
  
  <p>How can one write a query that returns the sum of ASCII codes of the characters in each row's <code>word</code>?</p>
  
  <p>For example, first row should be <code>294</code> ('abc' becomes 97+98+99=294) and second row should be <code>303</code> ('def' becomes 100+101+102=303).</p>