Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 1305EB5DBDF for ; Tue, 25 Oct 2011 16:10:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 24566-07 for ; Tue, 25 Oct 2011 19:10:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DFE79B5D95B for ; Tue, 25 Oct 2011 16:10:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p9PIDTYJ025981; Tue, 25 Oct 2011 14:13:29 -0400 (EDT) To: "Evgeniy Galkin" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6270: Invalid string comparison if the string contains '+' or '-' sign. In-reply-to: <201110251537.p9PFbxVn000209@wwwmaster.postgresql.org> References: <201110251537.p9PFbxVn000209@wwwmaster.postgresql.org> Comments: In-reply-to "Evgeniy Galkin" message dated "Tue, 25 Oct 2011 15:37:59 +0000" Date: Tue, 25 Oct 2011 14:13:28 -0400 Message-ID: <25980.1319566408@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/240 X-Sequence-Number: 31510 "Evgeniy Galkin" writes: > I'm trying to compare two strings which are starting with '+' and '-' signs. > And there is some strange behaviour. This is fairly standard if you're using a non-C locale. Try creating a fresh database with LC_COLLATE and LC_CTYPE set to 'C'. regards, tom lane