pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: whiplash <whiplash@bss.org.ua>
To: Daniele Varrazzo <daniele.varrazzo@gmail.com>
Cc: Jov <amutu@amutu.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #8118: Wrong sorting text
Date: Mon, 29 Apr 2013 14:00:56 +0300
Message-ID: <517E52E8.3040008@bss.org.ua> (raw)
In-Reply-To: <CA+mi_8Y-0DwHtFNxQZ9BZVjpHDXxNZNipq9-RF_M42trk=0R=w@mail.gmail.com>
References: <E1UVnVT-00085i-Ed@wrigleys.postgresql.org>
	<CADyrUxPz9ySFo+RQfJPyrWkL4N=9ouRjmVm=wvc71qXpxANbRA@mail.gmail.com>
	<CA+mi_8Y-0DwHtFNxQZ9BZVjpHDXxNZNipq9-RF_M42trk=0R=w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
>



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



view thread (4+ messages)

Message-ID: <517E52E8.3040008@bss.org.ua>
Permalink:  ../517E52E8.3040008@bss.org.ua/
Also on:    postgresql.org/message-id/517E52E8.3040008@bss.org.ua

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: whiplash@bss.org.ua, daniele.varrazzo@gmail.com, amutu@amutu.com
  Subject: Re: BUG #8118: Wrong sorting text
  In-Reply-To: <517E52E8.3040008@bss.org.ua>
  References: <E1UVnVT-00085i-Ed@wrigleys.postgresql.org> <CADyrUxPz9ySFo+RQfJPyrWkL4N=9ouRjmVm=wvc71qXpxANbRA@mail.gmail.com> <CA+mi_8Y-0DwHtFNxQZ9BZVjpHDXxNZNipq9-RF_M42trk=0R=w@mail.gmail.com> <517E52E8.3040008@bss.org.ua>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox