Re: BUG #6642: Spanish collation fault

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #6642: Spanish collation fault
Дата
Msg-id 1337195790-sup-2177@alvh.no-ip.org
обсуждение исходный текст
Ответ на BUG #6642: Spanish collation fault  (tulio.carrasco@gmail.com)
Ответы Re: BUG #6642: Spanish collation fault
Список pgsql-bugs
Excerpts from tulio.carrasco's message of mar may 15 21:45:00 -0400 2012:

> In Spanish every vowel has the same precedence value even with or without
> any type of accent, so: a =3D =C3=A1 =3D =C3=A4 =3D A =3D =C3=81 =3D =C3=
=84

> 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.

I see your point, and it makes sense, but it just doesn't work that way.

The way it works is that it goes over the first column and does the two
passes (first ignoring accents, second considering them) over it using
the collating rules you describe; and once that is complete, it goes to
look at the second column.  I don't think it's possible at all to
implement what you suggest, which is to make the first pass over all the
columns and then the second pass over all the columns.

I didn't try, but if you were to do an ORDER BY dad || ' ' || mum ' ' || na=
me
I think it should do what you want.  (Not really sure the spaces are
necessary).  Because then you're sorting on a single string and it can
do the first pass on the whole thing and then the second pass.

--=20
=C3=81lvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Alex Hunsaker
Дата:
Сообщение: Re: [BUGS] Re: [BUGS] BUG #6645: Getting an error with “ERROR: PL/Perl function must return reference to hash or array”?
Следующее
От: kwalbrecht@cghtech.com
Дата:
Сообщение: BUG #6644: Query give wrong results when 'is not null' is applied in where clause