-
-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicode support for psycopg2 native hstore implementation #2
Unicode support for psycopg2 native hstore implementation #2
Conversation
@@ -393,7 +393,8 @@ def on_connect(conn): | |||
hstore_oids = self._hstore_oids(conn) | |||
if hstore_oids is not None: | |||
oid, array_oid = hstore_oids | |||
extras.register_hstore(conn, oid=oid, array_oid=array_oid) | |||
extras.register_hstore(conn, oid=oid, array_oid=array_oid, | |||
unicode=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if unicode=True
should be hardcoded like this, probably some extra parameter should be used like use_hstore_unicode
in __init__()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well we have a param already called use_native_unicode
, which has the effect of using psycopg2.extensions.UNICODE
, and this param is generally set. Though im not quite sure we should link to hstore, does this prevent binary data from being retrieved from the hstore ? or perhaps, what's the behavior with the non-native hstore, do we return unicode in that implementation? ( I didn't write it, would have to check)
well its in here: 8fecf4b there's some other changes surrounding it, tests, non-psycopg2 support, etc. thanks ! |
Thank you! I see you have done a lot of work for it that one would probably expect from me. |
don't create a history entry when an object in a backref has changed
don't create a history entry when an object in a backref has changed
Bumped version number for private j5 release, and added explanation
Fixed issue in MyPy extension which crashed on detecting the type of a :class:`.Column` if the type were given with a module prefix like ``sa.Integer()``. Fixes: sqlalchemy/sqlalchemy2-stubs/#2 Change-Id: I71f53a6ced501ae144e28ce255cf3f50ea2b2e84
This is draft pull request for unicode support for psycopg2 native hstore implementation. You would probably expect unittests for this and may be unicode support for non-native hstore support. Please, point this out and I will fix pull request.
I will also add some comments about unclear points in the source code.