From: tulio.carrasco@gmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #6642: Spanish collation fault
Date: Wed, 16 May 2012 01:45:00 +0000
Message-ID: <E1SUTIS-0005Yn-61@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 6642
Logged by: T J Carrasco
Email address: tulio.carrasco@gmail.com
PostgreSQL version: 9.1.3
Operating system: Ubuntu 12.04 LTS
Description:
In Spanish every vowel has the same precedence value even with or without
any type of accent, so: a = á = ä = A = Á = Ä
With OS locale = lc_collate = lc_ctype = es_ES.UTF-8 then:
CREATE TABLE test(id integer PRIMARY KEY, dad text, mum text, name text);
INSERT INTO test VALUES (1, 'león','valencia', 'josé'), (2, 'leon',
'mendoza', 'juan'), (3, 'león', 'valárd', 'jose'), (4, 'león','válencia',
'jos'), (5, 'león', 'mendoza', 'jua'), (6, 'leon', 'valencia', 'josie'), (7,
'león', 'valencia', 'josie'), (8, 'leo','zara', 'juan'), (9,
'león','Valencia', 'jos');
SELECT * FROM test order by dad, mum, name;
We obtain:
id | dad | mum | name
---+------+----------+-------
8 | leo | zara | juan
2 | leon | mendoza | juan
6 | leon | valencia | josie
5 | león | mendoza | jua
3 | león | valárd | jose
1 | león | valencia | josé
7 | león | valencia | josie
9 | león | Valencia | jos
4 | león | válencia | jos
(9 rows)
Which doesn´t accomplish with Spanish collation. It should be something like
this:
id | dad | mum | name
---+------+----------+-------
8 | leo | zara | juan
2 | leon | mendoza | juan
5 | león | mendoza | jua
3 | león | valárd | jose
4 | león | válencia | jos
9 | león | Valencia | jos
1 | león | valencia | josé
6 | leon | valencia | josie
7 | león | valencia | josie
(9 rows)
In which due dad column has the same value it uses the mum column and if
they also have the same value then it should use the name column.
Thanks in advance for your help.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tulio.carrasco@gmail.com
Subject: Re: BUG #6642: Spanish collation fault
In-Reply-To: <E1SUTIS-0005Yn-61@wrigleys.postgresql.org>
References: <E1SUTIS-0005Yn-61@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox