Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxFP1-0004p9-0b for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Feb 2019 18:18:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gxFOz-0007nz-Mm for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Feb 2019 18:18:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxFOz-0007ml-DL for pgsql-bugs@lists.postgresql.org; Fri, 22 Feb 2019 18:18:25 +0000 Received: from smtp-noram01h.asg.com ([67.239.247.175]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxFOw-0000xF-M2 for pgsql-bugs@lists.postgresql.org; Fri, 22 Feb 2019 18:18:24 +0000 Received: from SMTP-NORAM01H.ASG.COM (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 91B971E7AFD8_C703CEBB; Fri, 22 Feb 2019 18:18:19 +0000 (GMT) Received: from smtp-noram01.asg.com (unknown [10.5.17.23]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by SMTP-NORAM01H.ASG.COM (Sophos Email Appliance) with ESMTPS id 5BE191E79576_C703CEAF; Fri, 22 Feb 2019 18:18:18 +0000 (GMT) Received: from USAPFMAIL03V.asg.com (10.5.18.183) by USAPFMAIL02V.asg.com (10.5.17.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Fri, 22 Feb 2019 13:18:16 -0500 Received: from USAPFMAIL03V.asg.com ([fe80::5c91:aa2f:51c0:5690]) by USAPFMAIL03V.asg.com ([fe80::5c91:aa2f:51c0:5690%2]) with mapi id 15.01.1591.012; Fri, 22 Feb 2019 13:18:16 -0500 From: Kaleb Akalework To: Tom Lane CC: "pgsql-bugs@lists.postgresql.org" Subject: RE: BUG #15651: Collation setting en_US.utf8 breaking sort order Thread-Topic: BUG #15651: Collation setting en_US.utf8 breaking sort order Thread-Index: AQHUytjr4Po3DkMX1kaoGiwWI1I6jaXsH92A Date: Fri, 22 Feb 2019 18:18:16 +0000 Message-ID: <4ce38aace626460e85ed2abe0051371c@asg.com> References: <15651-0caa86edc3ca0505@postgresql.org> <17689.1550858606@sss.pgh.pa.us> In-Reply-To: <17689.1550858606@sss.pgh.pa.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.10.163.239] x-exclaimer-md-config: 5902c074-9711-4a94-8042-bf8180fde9c1 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SASI-RCODE: 200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asg.com; h=from:to:cc:subject:date:message-id:references:in-reply-to:content-type:content-transfer-encoding:mime-version; s=SEAKey; bh=q9lNicgX8ffZ/NpMPrhRJ2OGoisnItqTTZFWEI7I0Ys=; b=VarF5aA44NrYBk3GBAyjO82znuTGxV4vt/utoBTZQKLB+zghE/lkDXzrDeZP9t+J9meDSHEHv+9LrzCvVRAv1oOZSJLrhkPrRsPmz4IDLaL0CMxwF7cXlbbIAPsSU5OZbjTFVdiDuGc3RV6tatxBM0qrS5v5A55oMFOvniQRxV6LrOwBX+12pyWuJYzJcGOkr1L++gWMo9bli6VhsXv4GJGOWK0ApUZJ1+vxTQBkOCUaVl8i7CRVxFEwGbGMdLquUHA1GBSnKo0R9LqxdXuSp71FqiXxi75bOioJj272zG394ewF9VD1olShbmowvzYLVfSX6tjGhRedvYTTkVSj1g== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --> Really? AFAIK, Windows doesn't support collation names that look like = that. I meant to say Linux. Not Windows. -----Original Message----- From: Tom Lane =20 Sent: Friday, February 22, 2019 1:03 PM To: Kaleb Akalework Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15651: Collation setting en_US.utf8 breaking sort order *** External email: Verify sender before opening attachments or links *** PG Bug reporting form writes: > I have PostgresSQL database on Windows. I created database with=20 > Collation of en_US.utf8. Really? AFAIK, Windows doesn't support collation names that look like that= . > Then I created table (The steps to reproduce are below). I inserted a=20 > few rows into this table one of which was row with special characters=20 > "~!@#$^&(". The insert worked fine but then when I do a select on the=20 > column for values >=3D' ' (Space), I get back all the rows except for=20 > the row that contains "~!@#$^&(" . This appears to be the intended behavior of en_US sorting. On a Linux machine I can reproduce it outside Postgres: $ LANG=3DC sort stuff.txt AAA BAA CAA DAA ~!@#$^&( $ LANG=3Den_US sort stuff.txt ~!@#$^&( AAA BAA CAA DAA (The first line in my test file contains one space.) regards, tom lane