]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix(copy): restore selecting loader for each item
authorJörg Breitbart <jerch@rockborn.de>
Thu, 23 Oct 2025 15:02:25 +0000 (17:02 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 25 Oct 2025 10:11:16 +0000 (11:11 +0100)
commit1018c32edadd7d8460db5c6c812d0ef925ccd023
tree4b3bc97c436e84a41b688aeadf326425d82a165f
parent1233ab09ab19b2ad3783f39eaca86c3317d02282
fix(copy): restore selecting loader for each item

In the copy refactoring released in 3.2.11 we changed the behaviour to
choosing a dumper at the first non-null value per column and keeping it.

Turns out more people than expected rely on the more flexible behaviour
of passing strings or types and letting postgres do the conversion.

Restore the previous behaviour; however it's possible to use
`copy.set_types()` to set dumpers per column and gain something in
performance.

Fix #1192
psycopg_c/psycopg_c/_psycopg/copy.pyx
tests/test_copy.py
tests/test_copy_async.py