-
Notifications
You must be signed in to change notification settings - Fork 368
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
unaccent support in PostgreSQL 8.4 #11
Comments
It might be possible. We haven't tested it. This looks like it would work: https://launchpad.net/postgresql-unaccent |
I haven't been able to get it to work, so for now I've disabled it in version 0.3.2. d5bf5ec Disable {:ignoring => :accents} in PostgreSQL 8.x |
I installed the unaccent extension and it works a treat on my local, running 9.1.3, however Heroku's shared database option still seems to be running 8.3. Is there a patch available to fix this? I keep getting this when running heroku rake db:migrate. PG::Error: ERROR: syntax error at or near "extension" Thanks |
Yeah I don't think Heroku allows you to supply your own compiled PostgreSQL contrib packages for security reasons. And the Heroku is working on a shared PostgreSQL 9.1 solution but I'm not sure how far along it is. https://addons.heroku.com/heroku-shared-postgresql If stripping accents is an important concern, you could add an additional column to your model (called something like content or search_content) and have a before_validate hook on your model that copies over the appropriate text there and strips accents in the Ruby layer. The disadvantage is that by caching the unaccented version in another column, you run the risk of the search_content going out-of-sync with the rest of the columns. For example, if you use update_attribute or another method that updates without calling callbacks. |
unaccent not included for Posgresql 8.4, how work around?
The text was updated successfully, but these errors were encountered: