Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A59F26361BD for ; Fri, 12 Mar 2010 12:30:14 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 84755-04-7 for ; Fri, 12 Mar 2010 16:30:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 4D181636125 for ; Fri, 12 Mar 2010 12:29:47 -0400 (AST) 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 o2CGTjCx000623; Fri, 12 Mar 2010 11:29:45 -0500 (EST) To: "Dan McFadyen" cc: pgsql-sql@postgresql.org Subject: Re: Odd query behavior In-reply-to: References: Comments: In-reply-to "Dan McFadyen" message dated "Fri, 12 Mar 2010 10:41:30 -0500" Date: Fri, 12 Mar 2010 11:29:45 -0500 Message-ID: <622.1268411385@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.457 tagged_above=-10 required=5 tests=AWL=0.142, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/68 X-Sequence-Number: 33775 "Dan McFadyen" writes: > I've come across an odd situation. I've had access to a database where a > the following happens: What are the plans for the two queries? If either one involves use of an index, does disabling the index change the results? > I do know that server it was running on was Finnish. The database uses a > UTF8 encoding though, so I don't know what that would make any > difference. The other line of thought that suggests is that you've got an encoding/locale mismatch that's messing up text comparisons. What's the server's LC_CTYPE setting, and what PG version is this anyway? regards, tom lane