]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Use an explicit dumper map for the auto format.
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 1 May 2021 23:26:35 +0000 (01:26 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 1 May 2021 23:26:35 +0000 (01:26 +0200)
commit9d49bf880183073eb86bb9db14fb4b5a353350d9
tree4535c560252ccd5363f0f0a436f4dfb9f2eee1ef
parentd5c979a0e7e871fe5086ae71500eea9c21b1058a
Use an explicit dumper map for the auto format.

The dumper chosen in auto format is the last one registered, if both the
text and binary ones are available. For all the builtin types the
preferred format is binary, except for strings and for json.

Dumping strings as text by default was handled by a special case; now
they are just handled by registering the text dumper after the binary
one. Json is now text by default, because it's marginally more
efficient.
docs/advanced/adapt.rst
docs/basic/params.rst
psycopg3/psycopg3/adapt.py
psycopg3/psycopg3/types/__init__.py
tests/fix_faker.py
tests/test_adapt.py