On 12/2/20 3:20 AM, Daniele Varrazzo wrote:
Hello,



As a result people could use:

     conn = psycopg3.connect(dsn)
     record = conn.execute(query, params).fetchone()
     # or
     for record in conn.execute(query, params):
         ... # do something

That is what the sqlite3 module does and I find it handy.


No other methods bloating the connection interface: no executemany(),
copy(), callproc (actually there will be no callproc at all in

Just to be clear the above(callproc excepted) or some variation of it will still be available off the cursor interface, correct?

psycopg3: postgres has no fast path for function call and too much
semantics around stored procedure that a single callproc() couldn't
cover).

Being the cursor client-side, its close() doesn't actually do anythin
apart from making it unusable, so just disposing of it without calling
close() is totally safe.

Thoughts?

Cheers!

-- Daniele




--
Adrian Klaver
adrian.kla...@aklaver.com


Reply via email to