]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Fix selection of dumper by oid
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 23 Sep 2021 14:22:26 +0000 (16:22 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 26 Sep 2021 19:51:39 +0000 (21:51 +0200)
commite19c12a38141e7ae34b34eb2baae0be1fb3429e8
tree5674cd216d5d3511e000c90b0c294dafb19165fd
parent77123e1a81381532fa51af9511af2d08e46a2396
Fix selection of dumper by oid

Add a few dumpers which can deal with the different types and make sure
to register them so that the lookup by oid would use them. Because they
are slightly less efficient (with isinstance tests) we prefer to have
them only used by oid, instead of extending the domain of the dumpers
used in normal adaptation by type.

This commit only fixes the Python side. The C numeric dumpers require
more work.
psycopg/psycopg/__init__.py
psycopg/psycopg/dbapi20.py
psycopg/psycopg/postgres.py
psycopg/psycopg/types/array.py
psycopg/psycopg/types/net.py
psycopg/psycopg/types/numeric.py