Re: Weird sorting order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Voinea <robert.voinea@xxxxxxxx> wrote:
 
> Why is it that when running the query:
> 
> SELECT * FROM test ORDER BY val;
> 
> I get the following result?
>  id |  val  
> ----+-------
>   1 | 200
>   2 | 201
>   3 | 202
>   4 | 203
>   5 | 210
>   6 | 211
>   7 | 2##23
>   8 | 2##24
>   9 | 2##25
>  10 | 2##33
>  11 | ##26
>  12 | 2ff
>  13 | ##31
>  14 | ##32
>  15 | ##34
> (15 rows)
> 
> Shouldn't value '2ff' be placed right after '211' but before
> '2##23'?
 
That depends on your collation configuration.  What do you get
from?:
 
show lc_collate;
 
In many collations, special characters such as '#' are ignored. 
 
-Kevin

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux