title: How to format money in PostgreSQL
body: <p>I have float field that contains (for example): 1234.5678. I would like to display it like a 1 234.56 or 1 234,56. How can I do that?</p>
  
  <p>I used <code>to_char()</code> function that gives me:</p>
  
  <pre><code>SELECT to_char(12345.5678,'99999999999999999D99');
  -&gt; 12345,57
  </code></pre>
  
  <p>but, when I have zero-value...</p>
  
  <pre><code>SELECT to_char(0,'99999999999999999D99');
  -&gt; ,00
  </code></pre>