Unaccent: create new dictionary based template

From: Daniel Vázquez <daniel2d2art(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Unaccent: create new dictionary based template
Date: 2012-02-21 22:42:37
Message-ID: CA+KJVfykuuj3zq8dpmJrOW5WkWQ2AJV7i7Tp+rbU4=RVePR2bg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys!

I'want to run unaccent function with a custom unaccent dictionary

I know that we can do:

Select unaccent('áéíóúñ')
Select unaccent('unaccent', 'áéíóúñ')

Select unaccent('custom_unaccent', 'áéíóúñ)

PG Docs say that we can set the rules for default installed unaccent
dictionary:

ALTER TEXT SEARCH DICTIONARY unaccent (RULES='custom_unaccent');

And PG Docs too say that we can create another dictionary based on the
template. I think this is the right way to maintain several custom unaccent
needs without override default unaccent rules. But I don't know how to
create unaccent dictionary from a template.

What dictionary type we must to create?
Please can show me what are the commands sentences we must to execute to
create this "unaccent_custom" dictionary and it will be ready for use
in Select unaccent('custom_unaccent', 'áéíóúñ) ??

Thx

Browse pgsql-general by date

  From Date Subject
Next Message Scott Mead 2012-02-21 22:59:34 Re: Why warm-standby doesn't work using file-based log shipping method?
Previous Message David Johnston 2012-02-21 22:14:05 Re: Combining data from Temp Tables