title: Run postgresql functions in python and gets error
body: <p>I would like to run below postgresql function queries in python but I keep getting error message says </p>
  
  <pre><code>cursor = connection.cursor()
  cursor.execute("SELECT 
  ST_Distance_sphere(st_makepoint(32.836956,39.925018)
  ,st_makepoint(28.990174,41.036857))")
  df = cursor.fetchall()
  df
  
  InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
  </code></pre>
  
  <p>How can I fix this? Thank you.</p>