diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-01-18 15:09:20 +0000 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2019-01-18 15:09:20 +0000 |
commit | fd31a7d41b84d26f102dabb8b64ebe88e49983ab (patch) | |
tree | fb9041f768247618868b6fed4aae8297a1e23fa0 | |
parent | f713dc9fc1c2a915b306c944e51e800d5ab7e1ef (diff) | |
download | psycopg2-fd31a7d41b84d26f102dabb8b64ebe88e49983ab.tar.gz |
Fixed typecast definition order
Didn't notice that the order matter: the last typecaster registered is
the effective one so let STRING win over UNICODE and BYTES.
-rw-r--r-- | psycopg/typecast_builtins.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/psycopg/typecast_builtins.c b/psycopg/typecast_builtins.c index 11e2605..9d2633d 100644 --- a/psycopg/typecast_builtins.c +++ b/psycopg/typecast_builtins.c @@ -39,8 +39,8 @@ static typecastObject_initlist typecast_builtins[] = { {"FLOAT", typecast_FLOAT_types, typecast_FLOAT_cast, NULL}, {"DECIMAL", typecast_DECIMAL_types, typecast_DECIMAL_cast, NULL}, {"UNICODE", typecast_STRING_types, typecast_UNICODE_cast, NULL}, - {"STRING", typecast_STRING_types, typecast_STRING_cast, NULL}, {"BYTES", typecast_STRING_types, typecast_BYTES_cast, NULL}, + {"STRING", typecast_STRING_types, typecast_STRING_cast, NULL}, {"BOOLEAN", typecast_BOOLEAN_types, typecast_BOOLEAN_cast, NULL}, {"DATETIME", typecast_DATETIME_types, typecast_DATETIME_cast, NULL}, {"DATETIMETZ", typecast_DATETIMETZ_types, typecast_DATETIMETZ_cast, NULL}, |