PostgreSQL/performance one general cursor or create for every query
问题 I am building a script to store some data in a database. First time I'm using PostgeSQL and everything goes well and as planned. I was thinking about the usage of the Cursor in PostgreSQl and what if I am making a lot of them while one is enough. But I don't want to pass the cursor to all my SQL functions. Here's my simplified example. dbConn, dbCurs = openDataBase(config) doSomeThing(dbCurs, name, age, listOfJohns) def doSomething(dbCurs, name, age, listOfPoeple): listOfPoeple