We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally submitted by: Jean-Baptiste Quenot
Consider the following program with the default implementation of RealDictCursor:
RealDictCursor
import psycopg2.extras conn = psycopg2.connect('dbname=test', connection_factory=psycopg2.extras.RealDictConnection) curs = conn.cursor('unique_name') curs.itersize = 2000 curs.execute("select * from foo limit 25") curs.fetchone()
The output with PSYCOPG_DEBUG=1 contains the following lines:
PSYCOPG_DEBUG=1
[0x7f603d53c700] FETCH FORWARD 1 FROM "unique_name"
I have to override the Cursor class like this to fetch the proper number of rows:
Cursor
class Cursor(psycopg2.extras.RealDictCursor): def next(self): return psycopg2.extras._cursor.next(self) class Connection(psycopg2.extras._connection): """A connection that uses `Cursor` automatically.""" def cursor(self, name=None): if name is None: return psycopg2.extras._connection.cursor(self, cursor_factory=Cursor) else: return psycopg2.extras._connection.cursor(self, name, cursor_factory=Cursor) conn = psycopg2.connect('dbname=test', connection_factory=Connection) ...
The debug output is OK:
[0x7f86ba488700] FETCH FORWARD 2000 FROM "unique_name"
The text was updated successfully, but these errors were encountered:
Fixed in my devel branch, thank you for the report.
Sorry, something went wrong.
Originally submitted by: ecigarette2012
Dreambox DM800 HD PVR dm800 800hd dreambox dm800hd dm 800 hd dm 800 hd pvr dreambox hd dreambox 800 hd dm 800 dreambox dm 800 hd pvr dreambox dm 800 hd dreambox 800 dm800hd dreambox dm800 dm800 hd pvr Dreambox DM800C
Dreambox dm800S dreambox 800s
Dreambox DM500S
dm500S dm 500S dm500 dreambox 500 dreambox 500s dm500c Dreambox dm500T Dreambox DM500T
ORTON HD X403P
Dreambox DM500Si
electronics cigarette
electronic cigarette liquid premium
electronic cigarette electronic
cigarette manufacturer
cheapest electronic cigarette
china electronic cigarette
electronic cigarette reviews
electronic cigarette starter kits
electronic cigarette price
No branches or pull requests
Originally submitted by: Jean-Baptiste Quenot
Consider the following program with the default implementation of
RealDictCursor
:The output with
PSYCOPG_DEBUG=1
contains the following lines:I have to override the
Cursor
class like this to fetch the proper number of rows:The debug output is OK:
The text was updated successfully, but these errors were encountered: