Re: BUG #8118: Wrong sorting text - Mailing list pgsql-bugs

From whiplash
Subject Re: BUG #8118: Wrong sorting text
Date
Msg-id 517E52E8.3040008@bss.org.ua
Whole thread Raw
In response to Re: BUG #8118: Wrong sorting text  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List pgsql-bugs
Thank you, works fine.
>>> Bug reference:      8118
>>> Logged by:          whiplash
>>> Email address:whiplash@bss.org.ua
>>> PostgreSQL version: 9.2.2
>>> Operating system:   Linux (Fedora 11, Fedora 16 and Ubuntu 12.04)
>>> Description:
>>>
>>> I execute query (1):
>>>
>>> SELECT t.name
>>> FROM
>>> (
>>>      SELECT 'AAA AAA' AS name
>>>      UNION ALL
>>>      SELECT 'AAA_AAA'
>>>      UNION ALL
>>>      SELECT 'BBB_AAA'
>>>      UNION ALL
>>>      SELECT 'BBB AAB'
>>> ) t
>>> ORDER BY t.name
>>>
>>> and I getting a result:
>>>
>>> AAA AAA
>>> AAA_AAA
>>> BBB_AAA
>>> BBB AAB
> It's a matter of collate. If you want ascii ordering specify collate "C".
>
> ...
> ORDER BY t.name collate "C";
>    name
> ---------
>   AAA AAA
>   AAA_AAA
>   BBB AAB
>   BBB_AAA
> (4 rows)
>
> -- Daniele
>

pgsql-bugs by date:

Previous
From: matti.aarnio@methics.fi
Date:
Subject: BUG #8127: After failed insert a select to figure out what failed is rejected
Next
From: dennis.coomans@hva.nl
Date:
Subject: BUG #8126: error in translation dutch