title: Display multiple values of a column in one row in PostgreSQL
body: <p>I have a query like this:</p>
  
  <pre><code>select to_date(to_char(registime, 'YYYY-MM'),'YYYY-MM') as dt,count(id) as total_call  
  from all_info 
  where alarm_id is null
  group by dt   
  order by dt
  </code></pre>
  
  <p>And the result just like this:</p>
  
  <pre><code>dt          total_call      
  2011-03-01     45
  2011-04-01     61
  2011-05-01     62
  2011-06-01     41
  2011-07-01     48
  2011-08-01     42
  2011-09-01     28
  2011-10-01     39
  </code></pre>
  
  <p>I want the result like in the demo below, a table form:</p>
  
  <pre><code>2011-03-01   2011-04-01  2011-05-01  2011-06-01  ..........
     45            61          62          41
  </code></pre>
  
  <p>I want to use <strong>crosstab</strong>, but it doesn't seem to work?</p>