How to use database adapters' cursors safely?
Posted
by
lvictorino
on Programmers
See other posts from Programmers
or by lvictorino
Published on 2012-06-08T12:24:25Z
Indexed on
2012/06/08
16:48 UTC
Read the original article
Hit count: 428
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?
© Programmers or respective owner