How to use database adapters' cursors safely?
https://softwareengineering.stackexchange.com/questions/152037
سؤال
I started to use psycopg2 to connect my little python script to a PostgreSQL database few days ago. After some research I found that a lot of database connector, like psycopg, work using cursors.
I know what is a cursor and how to use it. But I still wonder if it's safe to use the same cursor all along the script life.
Is it safe?
Or would it be preferable to use a different cursor for each query?
لا يوجد حل صحيح
لا تنتمي إلى softwareengineering.stackexchange