我已经使用 lc_collate、lc_ctype = es_PE.UTF-8 安装了 Ubuntu 12.04 和 PG 9.1,但它没有按预期进行整理(u = ü = ú = U = Ú = Ü)。
如果我:
CREATE TABLE testing (id integer PRIMARY KEY, dad text, mum text, name text);
INSERT INTO testing 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 testing ORDER BY dad, mum, name;
然后我得到:
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)
我必须如何配置它才能获得:
id | dad | mum | name
----+------+----------+-------
8 | leo | zara | juan
5 | león | mendoza | jua
2 | leon | mendoza | juan
3 | león | valárd | jose
9 | león | Valencia | jos
4 | león | válencia | jos
1 | león | valencia | josé
7 | león | valencia | josie
6 | leon | valencia | josie
(9 rows)
这是在 MySQL 中完成的,没有任何问题。但我不能在 PG 9.1 中配置它
提前致谢...