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
Necessary changes:
execute_values
executemany
cursor_factory=psycopg2.extras.DictCursor
row_factory=dict_row
psycopg2
I already made changes based on https://www.psycopg.org/psycopg3/docs/basic/from_pg2.html be5f4b2 087a5ff
Possible improvements:
with
connection.execute()
execute()
fetch*()
Other advantages: server-side binding, prepared statements.
That said, most of our time is probably spent doing calculations in Python, not interacting with PostgreSQL, so not urgent.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Necessary changes:
execute_values
toexecutemany
Alternatives to "psycopg2.extras.execute_values" and "psycopg2.extras.execute_batch" psycopg/psycopg#114cursor_factory=psycopg2.extras.DictCursor
torow_factory=dict_row
https://www.psycopg.org/psycopg3/docs/advanced/rows.htmlpsycopg2
I already made changes based on https://www.psycopg.org/psycopg3/docs/basic/from_pg2.html be5f4b2 087a5ff
Possible improvements:
with
block for connectionconnection.execute()
for one-off statementsexecute()
andfetch*()
, etc. https://www.psycopg.org/psycopg3/docs/basic/usage.html#shortcutsOther advantages: server-side binding, prepared statements.
That said, most of our time is probably spent doing calculations in Python, not interacting with PostgreSQL, so not urgent.
The text was updated successfully, but these errors were encountered: