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

Always quote hstore keys and values #5973

Merged
merged 2 commits into from Apr 25, 2012
Merged

Always quote hstore keys and values #5973

merged 2 commits into from Apr 25, 2012

Conversation

rf-
Copy link
Contributor

@rf- rf- commented Apr 25, 2012

escape_hstore uses quotation marks around keys and values only if it seems necessary. However, it currently breaks in the presence of some non-ASCII characters. Instead of trying to guess which characters are safe, it seems better to always use quotes.

rf- added 2 commits April 24, 2012 20:46
escape_hstore uses quotation marks around keys and values only if it
seems necessary. However, it currently breaks in the presence of some
non-ASCII characters. Instead of trying to guess exactly which
characters are safe, it seems better to always use quotes.
@rf-
Copy link
Contributor Author

rf- commented Apr 25, 2012

This is related to issue #4896. Apparently the Postgres docs just say "Double-quote keys and values that include whitespace, commas, =s or >s", but in practice, some UTF-8 characters cause errors without the quotes.

tenderlove added a commit that referenced this pull request Apr 25, 2012
Always quote hstore keys and values
@tenderlove tenderlove merged commit bc7309c into rails:master Apr 25, 2012
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