title: Format double precision in PostgreSQL
body: <p>I have a table with 3 columns:</p>
  
  <pre><code>  customer_name varchar
   ,account_type varchar
   ,current_balance double precision
  </code></pre>
  
  <p>Example values for current_balance:</p>
  
  <pre>
  1200
  1500.5
  1500
  </pre>
  
  <p>I want them to display like this:</p>
  
  <pre>
  1200.00
  1500.50
  1500.00
  </pre>
  
  <p>I tried the following query:</p>
  
  <pre><code>SELECT to_char(current_balance,'9999999999999999D99')
    FROM bank;
  </code></pre>
  
  <p>It formats the way I want but adds a space at the beginning. How to solve this? Is there a better way to format?</p>