Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Unicode support for psycopg2 native hstore implementation #2

wants to merge 1 commit into from

Conversation

dmugtasimov
Copy link
Contributor

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.

@@ -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)
Copy link
Contributor Author

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__()

Copy link
Owner

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)

@zzzeek
Copy link
Owner

zzzeek commented May 29, 2013

well its in here: 8fecf4b there's some other changes surrounding it, tests, non-psycopg2 support, etc.

thanks !

@zzzeek zzzeek closed this May 29, 2013
@dmugtasimov
Copy link
Contributor Author

Thank you! I see you have done a lot of work for it that one would probably expect from me.

zzzeek pushed a commit that referenced this pull request Jun 17, 2013
don't create a history entry when an object in a backref has changed
zzzeek pushed a commit that referenced this pull request Jun 17, 2013
don't create a history entry when an object in a backref has changed
sqla-tester pushed a commit to sqla-tester/sqlalchemy that referenced this pull request Jul 23, 2014
davidfraser pushed a commit to davidfraser/sqlalchemy that referenced this pull request Nov 5, 2015
Bumped version number for private j5 release, and added explanation
s132048 pushed a commit to s132048/docs-korean-sqlalchemy that referenced this pull request Jun 5, 2019
sqlalchemy-bot pushed a commit that referenced this pull request Mar 18, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants