Skip to content

Conversation

@justinpryzby
Copy link
Collaborator

No description provided.

Justin Pryzby added 2 commits January 4, 2026 18:22
This won't be an issue in real life, but this keeps the test suite clean.

Found with: PYTHONPATH=pg valgrind --leak-check=full pytest ./tests/test_classic_connection.py::TestInserttable::test_inserttable_with_invalid_table_name  ./tests/test_classic_connection.py::TestInserttable::test_inserttable_with_invalid_column_name
This is especially important for nonlocal DBs, where libpq would do a
round trip for each row.

For a local DB, this is already ~10% faster.

$ time PYTHNOPATH=pg python3.11 -c "import pg; db=pg.DB(host='/tmp'); db.inserttable('t', [[1]]*9999999)"
real    0m2,079s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant