Re: BUG #15919: When sorting, does the result show that S > s is correct?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 1726002692(at)qq(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15919: When sorting, does the result show that S > s is correct?
Date: 2019-07-19 14:16:13
Message-ID: 23071.1563545773@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> postgres(at)[local]:5433[postgres]#select * from t order by info asc;
> +------+
> | info |
> +------+
> | s |
> | S |
> +------+
> (2 rows)

This is the expected behavior for en_US locale, as you can easily
confirm outside of Postgres:

$ (echo s; echo S) | LANG=en_US sort
s
S

Perhaps you are confusing it with C locale?

$ (echo s; echo S) | LANG=C sort
S
s

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-07-20 16:54:41 Re: SELECT with COLLATE results in segfault on trunk and 12 Beta 2
Previous Message PG Bug reporting form 2019-07-19 11:48:04 BUG #15919: When sorting, does the result show that S > s is correct?