Re: stable vs. immutable unaccent function - Mailing list pgsql-bugs

From Thangalin
Subject Re: stable vs. immutable unaccent function
Date
Msg-id CAANrE7psMMMW8mDqjx-4=xh+MTWov3cekyp8Q4Fkgwu5=-S6gw@mail.gmail.com
Whole thread Raw
In response to Re: stable vs. immutable unaccent function  (Marti Raudsepp <marti@juffo.org>)
List pgsql-bugs
Hi,

I wrote the unaccent_text wrapper function to achieve the following:

CREATE INDEX table_name_label_unaccent_idx
  ON table_name
  USING gin
  (unaccent_text(label::text) COLLATE pg_catalog."default" gin_trgm_ops);

I would have liked to use unaccent directly.

The fact that someone wrote such a comment should be a clue that it's a
> hack. :)
>

My comment. I acknowledge it was a hack. Couldn't see how to add the
unaccented index (without adding an extra column, which is just another
hack). ;-)

A proper solution, Marti, I thank you for: using the STABLE unaccent
function from MusicBrainz. I'll take a look -- hopefully it works with 9.1.

T

pgsql-bugs by date:

Previous
From: Greg Stark
Date:
Subject: Re: stable vs. immutable unaccent function
Next
From: frank@heuveltop.nl
Date:
Subject: BUG #8135: current_setting('DateStyle'); does not reflect User setting