Fix support for bigint's in JSONB data. Fixes #3587

This commit is contained in:
Aditya Toshniwal
2019-02-27 13:39:47 +00:00
committed by Dave Page
parent 6b3a628e7a
commit e6e7cf0f69
6 changed files with 31 additions and 12 deletions

View File

@@ -170,6 +170,7 @@ def register_global_typecasters():
# Treat JSON data as text because converting it to dict alters the data
# which should not happen as per postgres docs
psycopg2.extras.register_default_json(loads=lambda x: x)
psycopg2.extras.register_default_jsonb(loads=lambda x: x)
# pysycopg2 adapt does not support dict by default. Need to register
# Used http://initd.org/psycopg/docs/extras.html#json-adaptation