title: Postgresql "invalid end sequence"
body: <p>I've a function which adds users on my application. It does a few check, salts and hashes the password and then inserts the values. Now, when i run the function I get</p>
  
  <pre><code>ERROR: invalid end sequence
  </code></pre>
  
  <p>(to be honest, i get it in italian and had to do quite a job to find the corresponding english string).
  Now, the single parts work very well alone, but if I put everything together in a function I get the error so I'm pretty out of ideas. Any suggestion?</p>