From: | Moritz Schepp <moritz(dot)schepp(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Collation |
Date: | 2016-06-16 06:29:59 |
Message-ID: | CAFUw=9VC+dPpYyeUnbjrVWH53hpf9aTo+Ys+k+ufpg2Ha3U2aQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Thanks Tom for the quick answer!
that's good to know and the unaccent module seems like it should do the
folding. However, doesn't that mean that a specific index would have to be
created for every field I want to use this for (unless a text search
context would be used)?
Regards,
Moritz
On Sat, Jun 11, 2016 at 5:43 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Moritz Schepp <moritz(dot)schepp(at)gmail(dot)com> writes:
> > My problem is that I don't (even) get the german collation to work, the
> > following query yields 'f':
>
> > SELECT 'a' COLLATE "german" LIKE 'ä' COLLATE "german";
>
> > Shouldn't that be working?
>
> No. Postgres interprets COLLATE as having to do only with sort ordering.
> What you want here, IIUC, is to do accent-stripping on the data and/or the
> LIKE pattern before you compare them. Take a look at the contrib/unaccent
> module for one solution.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-06-16 14:57:47 | Re: Collation |
Previous Message | Joberlander | 2016-06-16 00:58:18 | Importing CSV from FileMaker to PostgreSQL with PgAdmin III |