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

Add psycopg2.extensions.quote_ident. #359

Merged

Conversation

a1exsh
Copy link
Contributor

@a1exsh a1exsh commented Oct 14, 2015

@dvarrazzo how about this way? #308

The compose stuff looks nice, but I only need something really simple and straightforward for #322: https://github.com/psycopg/psycopg2/pull/322/files#diff-e6256dfa32f9bced2faae91403f4d594R487

@dvarrazzo
Copy link
Member

I'm fine with it, I can merge it, but I would like to see unicode and Py3 tests.

What does the function return? str or unicode? what on py3? I think it should take both input, encode unicode in the connection encoding (use psycopg_ensure_bytes()) and I think it should always emit bytes, but py3 guys may not agree, they like useless encoding/decoding roundtrips, so probably conn_text_from_chars() is the right choice, yes, but I would like to see it checked in the test suite.

More notes on the way...

@dvarrazzo
Copy link
Member

I'm happy to merge this changeset to help you with your work on the streaming replication branch. Of course if we end up improving the quote_ident support as discussed in #308 we can refactor streaming replication to use the new method.

@a1exsh
Copy link
Contributor Author

a1exsh commented Oct 14, 2015

Thank you! Will update to address the comments.

@a1exsh
Copy link
Contributor Author

a1exsh commented Oct 15, 2015

Please see zalando-stups@89bb6b0

@dvarrazzo dvarrazzo merged commit 89bb6b0 into psycopg:master Oct 15, 2015
@dvarrazzo
Copy link
Member

Thank you, that was exactly what I expected.

Good luck with the replication stuff :)

@a1exsh
Copy link
Contributor Author

a1exsh commented Oct 15, 2015

Cool, many thanks! :)

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.

None yet

2 participants