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

Various fixes #63

Merged
merged 8 commits into from
Nov 15, 2015
Merged

Various fixes #63

merged 8 commits into from
Nov 15, 2015

Conversation

CGenie
Copy link
Contributor

@CGenie CGenie commented Oct 21, 2015

  • Fix encoding for psycopg2.extensions.adapt (which also fixes the skipped test)
  • Get rid of rhs_params.pop which caused re-ran queries (with qs.all() to be different)
  • Some tests improvements

Przemek Kaminski added 8 commits October 21, 2015 12:46
Problem is that if one just runs

psycopg2.extensions.adapt(<string>)

then the resulting QuotedString has encoding set to 'latin1'.

We need to run prepare(connection) on an instance of QuotedString
to get proper string encoding.
The problem is the pop method used there -- it destroys original information
about the config and when one runs the query again using q.all() that
information is not used again.

Appropriate test was added.
This way we can combine multiple tokenizers easily as in
    objects = pgfulltext_models.SearchManager(
        fields=('a', 'b',),
        search_field='search_index',
        config=('pg_catalog.english', 'pg_catalog.simple',),
    )
@bitrut
Copy link

bitrut commented Nov 12, 2015

Any plans for merging this PR?
Current master doesn't work properly.

linuxlewis added a commit that referenced this pull request Nov 15, 2015
@linuxlewis linuxlewis merged commit 89d86ff into linuxlewis:master Nov 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants