Re: spanish locale question

From: jbiskofski <jbiskofski(at)gmail(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: spanish locale question
Date: 2012-04-19 14:57:07
Message-ID: CAHpPzY4gTK4fMc=9ZS5LKoF048bQbLin11TxEvqtu3r=v4XMXg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Laurenz, thank you so much for your help. I had a hard time getting the
es_MX locale installed on my freebsd system, but once I did it worked
perfectly. Thanks for your help again.

- Jose

On Thu, Apr 19, 2012 at 2:30 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>wrote:

> jbiskofski wrote:
> > I have a lc_collate problem. Im in Mexico and I need the following three
> lastnames to be sorted this
> > way :
> >
> > álvarez ( accent on first a )
> > chavez
> > cota
> >
> > Using the default locale on my mac ( en_US ) I end up with :
> >
> > chavez
> > cota
> > álvarez
> >
> > So I switched to es_ES.ISO8859-15 and that gives me :
> >
> > álvarez
> > cota
> > chavez
> >
> >
> > ... There was a time when the "Real Academia Española" considered "CH",
> "LL" and "SH" as letters. They
> > changed that in 1994 :
> >
> > In 1994, the RAE ruled that the Spanish consonants "CH" (ché) and "LL"
> (elle) would hence be
> > alphabetized under "C" and under "L", respectively, and not as separate,
> discrete letters, as in the
> > past. The RAE eliminated monosyllabic accented vowels where the accent
> did not serve in changing the
> > word's meaning, examples include: "dio" ("gave"), "vio" ("saw"), both
> had an acutely-accented vowel
> > "ó"; yet the monosyllabic word "sé" ("I know", the first person,
> singular, present of "saber", "to
> > know"; and the singular imperative of "ser", "to be") retains its
> acutely-accented vowel in order to
> > differentiate it from the reflexive pronoun "se".
> >
> > http://en.wikipedia.org/wiki/Real_Academia_Espa%C3%B1ola
> >
> >
> > I think thats where the problem comes from.
> >
> > Anyway, any hints/clues/suicide-method-suggestions would be greatly
> appreciated!
>
> PostgreSQL uses the operating system's collations.
> Ask your operating system provider.
>
> On my RHEL 3 Linux system it works as you want it to:
>
> CREATE TABLE mexico(id integer PRIMARY KEY, val text NOT NULL COLLATE
> "es_ES.utf8");
>
> INSERT INTO mexico VALUES (1, 'cota'), (2, 'álvarez'), (3, 'chavez');
>
> SELECT * FROM mexico ORDER BY val;
>
> id | val
> ----+---------
> 2 | álvarez
> 3 | chavez
> 1 | cota
> (3 rows)
>
> Yours,
> Laurenz Albe
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Angelico 2012-04-19 15:01:43 Re: problem with serial
Previous Message Alban Hertroys 2012-04-19 14:55:04 Re: problem with serial