Properly handle bytea[], and 'infinity'::real/real[]. Fixes #2498. Fixes #2502.

This commit is contained in:
Murtuza Zabuawala
2017-06-20 10:19:11 +01:00
committed by Dave Page
parent a21dad4c45
commit d2ba57c1ab
2 changed files with 26 additions and 17 deletions

View File

@@ -60,8 +60,8 @@ psycopg2.extensions.register_type(
psycopg2.extensions.register_type(
psycopg2.extensions.new_type(
(
# To cast bytea and interval type
17, 1186,
# To cast bytea, bytea[] and interval type
17, 1001, 1186,
# to cast int4range, int8range, numrange tsrange, tstzrange,
# daterange
@@ -70,8 +70,8 @@ psycopg2.extensions.register_type(
# date, timestamp, timestamptz, bigint, double precision, bigint[]
1700, 1082, 1114, 1184, 20, 701, 1016,
# double precision[]
1022
# double precision[], real, real[]
1022, 700, 1021
),
'TYPECAST_TO_STRING', psycopg2.STRING)
)