title: DictCursor doesn't seem to work under psycopg2
body: <p>I haven't worked with psycopg2 before but I'm trying to change the cursor factory to DictCursor so that fetchall or fetchone will return a dictionary instead of a list.</p>
  
  <p>I created a test script to make things simple and only test this functionality. Here's my little bit of code that I feel should work</p>
  
  <pre><code>import psycopg2
  import psycopg2.extras
  
  conn = psycopg2.connect("dbname=%s user=%s password=%s" % (DATABASE, USERNAME, PASSWORD))
  
  cur = conn.cursor(cursor_factory = psycopg2.extras.DictCursor)
  cur.execute("SELECT * from review")
  
  res = cur.fetchall()
  
  print type(res)
  print res
  </code></pre>
  
  <p>The res variable is always a list and not a dictionary as I would expect.</p>
  
  <p>A current workaround that I've implemented is to use this function that builds a dictionary and run each row returned by fetchall through it.</p>
  
  <pre><code>def build_dict(cursor, row):
      x = {}
      for key,col in enumerate(cursor.description):
          x[col[0]] = row[key]
      return d
  </code></pre>
  
  <p>Python is version 2.6.7 and psycopg2 is version 2.4.2.</p>