{"action":"opened","issue":{"url":"https://api.github.com/repos/Casecommons/pg_search/issues/245","labels_url":"https://api.github.com/repos/Casecommons/pg_search/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/Casecommons/pg_search/issues/245/comments","events_url":"https://api.github.com/repos/Casecommons/pg_search/issues/245/events","html_url":"https://github.com/Casecommons/pg_search/issues/245","id":74325584,"number":245,"title":"Undefined function accent","user":{"login":"alex88","id":436888,"avatar_url":"https://avatars.githubusercontent.com/u/436888?v=3","gravatar_id":"","url":"https://api.github.com/users/alex88","html_url":"https://github.com/alex88","followers_url":"https://api.github.com/users/alex88/followers","following_url":"https://api.github.com/users/alex88/following{/other_user}","gists_url":"https://api.github.com/users/alex88/gists{/gist_id}","starred_url":"https://api.github.com/users/alex88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex88/subscriptions","organizations_url":"https://api.github.com/users/alex88/orgs","repos_url":"https://api.github.com/users/alex88/repos","events_url":"https://api.github.com/users/alex88/events{/privacy}","received_events_url":"https://api.github.com/users/alex88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-08T11:06:30Z","updated_at":"2015-05-08T11:06:30Z","closed_at":null,"body":"I'm trying to do a search with this configuration:\r\n\r\n```ruby\r\nclass Hospital < ActiveRecord::Base\r\n  include PgSearch\r\n  pg_search_scope :search_by_title_and_location,\r\n                  against: [:name, :city, :state],\r\n                  ignoring: :accents,\r\n                  using: {\r\n                    tsearch: { any_word: true },\r\n                    trigram: { threshold: 0.12 }\r\n                  }\r\nend\r\n```\r\n\r\nand I'm doing `Hospital.search_by_title_and_location('roma')` and the generated log is:\r\n\r\n```\r\nHospital Load (0.7ms)  SELECT \"hospitals\".* FROM \"hospitals\" INNER JOIN (SELECT \"hospitals\".\"id\" AS pg_search_id, (ts_rank((to_tsvector('simple', unaccent(coalesce(\"hospitals\".\"name\"::text, ''))) || to_tsvector('simple', unaccent(coalesce(\"hospitals\".\"city\"::text, ''))) || to_tsvector('simple', unaccent(coalesce(\"hospitals\".\"state\"::text, '')))), (to_tsquery('simple', ''' ' || unaccent('roma') || ' ''')), 0)) AS rank FROM \"hospitals\" WHERE (((to_tsvector('simple', unaccent(coalesce(\"hospitals\".\"name\"::text, ''))) || to_tsvector('simple', unaccent(coalesce(\"hospitals\".\"city\"::text, ''))) || to_tsvector('simple', unaccent(coalesce(\"hospitals\".\"state\"::text, '')))) @@ (to_tsquery('simple', ''' ' || unaccent('roma') || ' '''))) OR (similarity((unaccent(coalesce(\"hospitals\".\"name\"::text, '') || ' ' || coalesce(\"hospitals\".\"city\"::text, '') || ' ' || coalesce(\"hospitals\".\"state\"::text, ''))), unaccent('roma')) >= 0.12))) pg_search ON \"hospitals\".\"id\" = pg_search.pg_search_id  ORDER BY pg_search.rank DESC, \"hospitals\".\"id\" ASC\r\nPG::UndefinedFunction: ERROR:  function unaccent(text) does not exist\r\nLINE 1: ... AS pg_search_id, (ts_rank((to_tsvector('simple', unaccent(c...\r\n```\r\n\r\nwhat could be wrong? Postgresql version is 9.4.1"}}