ORDER BY DESC / ASC

Started by Анастасия Лагутаabout 5 years ago3 messagesbugs
Jump to latest

There is an issue found while using ORDER BY DESC / ASC, where letter 'w'
is before letter 'v'. Should it be that way? Because even having a look at
the ASCII table, everything should be vice versa.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Анастасия Лагута (#1)
Re: ORDER BY DESC / ASC

=?UTF-8?B?0JDQvdCw0YHRgtCw0YHQuNGPINCb0LDQs9GD0YLQsA==?= <natriksx@gmail.com> writes:

There is an issue found while using ORDER BY DESC / ASC, where letter 'w'
is before letter 'v'. Should it be that way?

Depends on what LC_COLLATE setting you're using. I think some languages
do sort that way, at least in some contexts.

regards, tom lane

In reply to: Анастасия Лагута (#1)
Re: ORDER BY DESC / ASC

On Mon, Mar 01, 2021 at 07:52:09PM +0200, Анастасия Лагута wrote:

There is an issue found while using ORDER BY DESC / ASC, where letter 'w' is before letter 'v'. Should it be that way? Because even
having a look at the ASCII table, everything should be vice versa.

Without knowing more we can't tell much. What is your locale? Did you
define special collate for database or columns?

Can you show us some sample data, and collate info?

Also, OS and Pg version info might be helpful.

Best regards,

depesz