title: Unable to fetch rows from PostGresSQL table
body: <p>I'm trying to fetch data from a table in the PostGreSQL database. I'm able to query the results using PostGreSQL but when I try to do so with Python using psycopg2 module, it doesn't return anything. The curse object returned is of type "None" and is non iterable.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>import psycopg2 as p
  con = p.connect(database="Scheduling", user="postgres", password="test", host="127.0.0.1", 
  port="5432")
  cur = con.cursor()
  df = cur.execute(''' SELECT * FROM  public."HOME" ''').fetchall()
  print(type(df))
  </code></pre>
  
  <p>Here's the error message:
  Traceback (most recent call last):
    File "C:/Users/adi.jakka/PycharmProjects/Flask/TEST.PY", line 4, in 
      df = cur.execute(''' SELECT * FROM  public."HOME" ''').fetchall()
  AttributeError: 'NoneType' object has no attribute 'fetchall'</p>
  
  <p>Process finished with exit code 1</p>