Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Cast value to text on PostgreSQL if custom decoder is used #14

Merged
merged 1 commit into from
Aug 18, 2019

Conversation

laymonage
Copy link
Contributor

Fix #5.

Instead of registering a no-op loads() to avoid psycopg2's automatic decoding, we cast the value into text. As the docs say, it is an efficient operation that doesn’t involve a copy.

@adamchainz
Copy link
Owner

Thanks @laymonage ! I eventually got the (pretty bit-rotted) tests to run against my local Postgres (10.4), so looks good.

@adamchainz adamchainz merged commit d781afd into adamchainz:master Aug 18, 2019
@adamchainz
Copy link
Owner

Released in version 1.3.0! https://pypi.org/project/django-jsonfield/1.3.0/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix to work in parallel with django.contrib.postgres.JSONField
2 participants