title: display postgres sql result using pg gem
body: <p>How do I display the result set of a postgres query using the pg gem only ? I want it to be in tabular form like it is in pgAdmin GUI tool. The code below does not help. The documentation is not clear, so I am unable to figure another way out. Please help !</p>
  
  <pre><code>require 'pg'
  conn = PGconn.connect("db.corp.com", 5432, '', '', "schema", "user", "pass")
  sql = 'select * from tbl limit 2'
  res  = conn.exec(sql)
  
  res.each do |row|
      row.each do |column|    
      end
  end
  </code></pre>
  
  <p>gem list -
  pg (0.9.0.pre156 x86-mswin32)</p>
  
  <p>ruby - 1.8.7</p>