From: Alvaro Herrera <alvherre@commandprompt.com>
To: tulio.carrasco <tulio.carrasco@gmail.com>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #6642: Spanish collation fault
Date: Wed, 16 May 2012 15:20:44 -0400
Message-ID: <1337195790-sup-2177@alvh.no-ip.org> (raw)
In-Reply-To: <E1SUTIS-0005Yn-61@wrigleys.postgresql.org>
References: <E1SUTIS-0005Yn-61@wrigleys.postgresql.org>
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 = á = ä = A = Á = Ä
> 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.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
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: alvherre@commandprompt.com, tulio.carrasco@gmail.com
Subject: Re: BUG #6642: Spanish collation fault
In-Reply-To: <1337195790-sup-2177@alvh.no-ip.org>
References: <E1SUTIS-0005Yn-61@wrigleys.postgresql.org> <1337195790-sup-2177@alvh.no-ip.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