Re: BUG #6642: Spanish collation fault
От | Tulio J Carrasco |
---|---|
Тема | Re: BUG #6642: Spanish collation fault |
Дата | |
Msg-id | CAFsvbVCz+sWanXP=-RJuON44P1E4mSfU8sSH9djUpgybbrLTwQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #6642: Spanish collation fault (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: BUG #6642: Spanish collation fault
|
Список | pgsql-bugs |
Thank you very much =C1lvaro, As far as I understood from someone who knows about ;) "...the SQL standard indicates to order according the first column and consider the second column only for those records which first column has identical order values..." The bug I refer to is that first column is FINALLY ordered for character value -not the order value which the collation requests. "Le=F3n", "leon", "leOn" has identical order values: none of them weights more for Spanish collation and PG is not working according it if PG makes a "second pass" that ignores collation and reorders by its character value. Best Regards Tulio On Wed, May 16, 2012 at 2:20 PM, Alvaro Herrera <alvherre@commandprompt.com>wrote: > > 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 witho= ut > > any type of accent, so: a =3D =E1 =3D =E4 =3D A =3D =C1 =3D =C4 > > > 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 ' ' || > name > 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. > > -- > =C1lvaro Herrera <alvherre@commandprompt.com> > The PostgreSQL Company - Command Prompt, Inc. > PostgreSQL Replication, Consulting, Custom Development, 24x7 support >
В списке pgsql-bugs по дате отправления: