Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by hub.org (8.10.1/8.11.0) with ESMTP id e9HJY1W19860 for ; Tue, 17 Oct 2000 15:34:01 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id e9HJXd501989; Tue, 17 Oct 2000 15:33:39 -0400 (EDT) To: depesz@depesz.pl cc: PGSQL-SQL Subject: Re: problem with select where like ']' In-reply-to: <20001017210251.A4327@cyber.cs.net.pl> References: <20001017210251.A4327@cyber.cs.net.pl> Comments: In-reply-to hubert depesz lubaczewski message dated "Tue, 17 Oct 2000 21:02:51 +0200" Date: Tue, 17 Oct 2000 15:33:38 -0400 Message-ID: <1986.971811218@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200010/159 X-Sequence-Number: 1821 hubert depesz lubaczewski writes: > but i'm just wondering why like ']' doesn't work. What LOCALE setting are you running the postmaster in? ']' is not a special character as far as LIKE is concerned, but I suspect you may be seeing another variant of the problems that LIKE index optimization has with peculiar collation rules. You can find plenty of discussion of this in the mailing list archives :-( If there is an index on the field you are doing LIKE on, try dropping the index to see if that makes the problem go away. Another possibility is that you have been careless about always starting the postmaster with the same LOCALE setting, in which case the index may actually be corrupt (out of order) due to different records having been inserted with different ideas about what the sort ordering should be. In that case, dropping and recreating the index should help. regards, tom lane