]> git.ipfire.org Git - thirdparty/psycopg.git/commit
Don't use row dumpers to dump a sequence
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 13 Oct 2021 23:26:09 +0000 (01:26 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 13 Oct 2021 23:32:02 +0000 (01:32 +0200)
commitdb75f1cdddb70e2b90e714d31d12c1f2efedbeff
treec7a5b044fe0a320d5a307a048731d123e5124bdd
parentd708e07e53198d5eb1dab4e1ab9be14e88c66e43
Don't use row dumpers to dump a sequence

Using row dumpers uses the assumption that the types will be the same if
we see the same query. It's easy to break this assumption. Being cheeky
is a way (like passing arguments 1, '2' to the same query...) but it's
easy to trigger the problem dumping numbers and going from in2-size to
int4-size.

This commit only fixes the Python implementation.

Ref. bug #112
psycopg/psycopg/_transform.py