fetchall

how handle a variable if it's returning none

how handle a variable if it's returning none Question: Hi I have the following function to get sql from my template. variable row is fetching the query which is input by the user. If the user input an invalid sql am getting an error as UnboundLocalError: local variable ‘row’ referenced before assignment (Because row is …

Total answers: 3

python postgres can I fetchall() 1 million rows?

python postgres can I fetchall() 1 million rows? Question: I am using psycopg2 module in python to read from postgres database, I need to some operation on all rows in a column, that has more than 1 million rows. I would like to know would cur.fetchall() fail or cause my server to go down? (since …

Total answers: 6