Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UVuQb-0007TJ-MG for pgsql-bugs@arkaria.postgresql.org; Sat, 27 Apr 2013 01:59:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UVuQb-0005BW-5h for pgsql-bugs@arkaria.postgresql.org; Sat, 27 Apr 2013 01:59:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UVnVe-0002FL-QY for pgsql-bugs@postgresql.org; Fri, 26 Apr 2013 18:36:38 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UVnVa-00032V-N1 for pgsql-bugs@postgresql.org; Fri, 26 Apr 2013 18:36:38 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UVnVY-0001xQ-Lb for pgsql-bugs@postgresql.org; Fri, 26 Apr 2013 18:36:33 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1UVnVT-00085i-Ed for pgsql-bugs@postgresql.org; Fri, 26 Apr 2013 18:36:27 +0000 Date: Fri, 26 Apr 2013 18:36:27 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #8118: Wrong sorting text To: pgsql-bugs@postgresql.org From: whiplash@bss.org.ua X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: 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:=20=20=20=20=20=20=20=20 I execute query (1): SELECT t.name FROM ( SELECT 'AAA AAA' AS name UNION ALL SELECT 'AAA_AAA' UNION ALL=20 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 I think this is result more correct: AAA AAA AAA_AAA BBB AAB BBB_AAA On Windows 7 and FreeBSD 9.x query (1) returns correct result. --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs