From: Tom Lane <tgl@sss.pgh.pa.us>
To: pmanousis@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16789: Wrong order by output
Date: Tue, 22 Dec 2020 16:50:51 -0500
Message-ID: <662062.1608673851@sss.pgh.pa.us> (raw)
In-Reply-To: <16789-087fbcd35ba8d334@postgresql.org>
References: <16789-087fbcd35ba8d334@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> I don't know if there is anything specific to do for having a proper ordered
> output, but the result seems wrong to me.
You need to use a locale (collation) that matches your expectations.
FWIW, I get the same ordering you show with COLLATE "en_US" on a
Linux box, and it's likely that glibc would use similar ordering
rules for some other languages. The behavior you say you want
looks like it'd match COLLATE "C", though that might act a little
funny with non-ASCII characters.
(I'm not here to defend glibc's sorting rules, but I think what
they're doing in this example is ignoring spaces in the first pass.)
You can find more about this topic in
https://www.postgresql.org/docs/current/charset.html
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pmanousis@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16789: Wrong order by output
In-Reply-To: <662062.1608673851@sss.pgh.pa.us>
* 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