Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Always quote hstore keys and values #5973

Merged
merged 2 commits into from Apr 25, 2012

Conversation

Projects
None yet
2 participants
Contributor

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 some commits Apr 25, 2012

Always quote hstore keys and values
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.
Contributor

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

Merge pull request #5973 from academia-edu/master
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