Error when calling cursor.execute with psycopg2 sql.SQL object I am trying to execute a raw update query using psycopg2 in django. The code is as below: