title: python pyscopg2 unable to select data from AWS redshift
body: <p>I have a postgres database on AWS redshift. Currently I use Python Pyscopg2 to interact with the database. I find that I can run:</p>
  
  <pre><code>curosr.execute("INSERT INTO datatype VALUES (%s, %s)", ("humidity", "some description"))
  connect.commit()
  </code></pre>
  
  <p>but when I do:</p>
  
  <pre><code>for row in cursor.execute("SELECT * FROM datatype"):
      print(row)
  </code></pre>
  
  <p>what ever I do, it always returns me None Type. <strong>Anyone can give me advice that what is the correct way to interact with redshift postgres?</strong></p>
  
  <p>Thank you</p>
  
  <p>As required, here's the <strong>whole code</strong></p>
  
  <pre><code>##encoding=utf8
  
  from __future__ import print_function
  import psycopg2
  
  def connect():
      conn = psycopg2.connect(host = "wbh1.cqdmrqjbi4nz.us-east-1.redshift.amazonaws.com",
                              port = 5439,
                              dbname = "dbname",
                              user = "user",
                              password = "password")
      c = conn.cursor()
      return conn, c
  
  conn, c = connect()
  
  c.execute("INSERT INTO table netatmo VALUES (%s, %s)", (1, 10.5))
  conn.commit() # this works, and I can see the data in other db client software
  
  for row in c.execute("SELECT * FROM netatmo").fetchall(): # this not working
      print(row) # AttributeError: 'NoneType' object has no attribute 'fetchall'
  </code></pre>