Re: [BUGS] Problem with PostgreSQL string sorting - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: [BUGS] Problem with PostgreSQL string sorting
Date
Msg-id CAH2-Wzk5NzT-Tsn+O+XLprGvPYD+Uk61kWeU1yVJZb97pJNQTg@mail.gmail.com
Whole thread Raw
In response to [BUGS] Problem with PostgreSQL string sorting  (Hari Sankar A <hsshanthamhari@gmail.com>)
Responses Re: [BUGS] Problem with PostgreSQL string sorting  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, Feb 15, 2017 at 7:44 AM, Hari Sankar A <hsshanthamhari@gmail.com> wrote:
> I am a Database administrator and we are using PostgreSQL-9.6.1 version in
> RHEL-7 linux machine. Current server Encoding setup is UTF8 and LC_COLLATE
> and LC_CTYPE is en_US.UTF-8.

The behavior of each collation comes from the operating system's own
libc, except for the C collation, which is based on the ordering
implied by strcmp() comparisons. Generally, most implementations have
the behavior you describe, in that they assign least weight of all to
caseness and whitespace, and somewhat more weight to punctuation. I
don't think that there is much that can be done about it in practice,
though in principal there could be a collation that has all the
properties you want.

Future versions of PostgreSQL may have better support for this kind of thing.

-- 
Peter Geoghegan


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Hari Sankar A
Date:
Subject: [BUGS] Problem with PostgreSQL string sorting
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] Problem with PostgreSQL string sorting