Received: from mail.goodwill.hu (ip186.d111.tiszanet.hu [217.65.111.186] (may be forged)) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0O9AI079257 for ; Wed, 24 Jan 2001 04:10:19 -0500 (EST) (envelope-from attila.kevei@goodwill.hu) Received: (from nobody@localhost) by mail.goodwill.hu (8.11.0/8.8.7) id f0O9AXl05733 for pgsql-sql@postgresql.org; Wed, 24 Jan 2001 10:10:33 +0100 X-Authentication-Warning: mail.goodwill.hu: nobody set sender to attila.kevei@goodwill.hu using -f To: Postgres SQL list Subject: Re: select returns no line Message-ID: <980327433.3a6e9c092718d@www.goodwill.hu> Date: Wed, 24 Jan 2001 10:10:33 +0100 (CET) From: Attila Kevei References: <980253179.3a6d79fb29871@www.goodwill.hu> <6602.980268898@sss.pgh.pa.us> In-Reply-To: <6602.980268898@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP IMAP webmail program 2.2.3 X-Originating-IP: 192.168.1.30 X-Archive-Number: 200101/314 X-Sequence-Number: 986 This locale-thing sounds good...:-) As I remember, we've changed the locale settings after the creation of the table. The former opinions (space after the text, value length, etc.) didn't help us too much. Anyway, thanks to all. So, I try to re-create the index. Attila Quoting Tom Lane : > Attila Kevei writes: > > Our database has a SELECT problem using varchar columns in WHERE > clause > > (but not in all rows!!!). > > We can fix the whole table (or just the row) as shown below but later > it > > seems wrong again (and after the fix the row isn't UPDATEd). > > Very bizarre. Is the bogus SELECT using an index? (Check with EXPLAIN > if you're not sure.) I am suspicious that it is using a corrupted > index. Try dropping and rebuilding the index and see if the problem > persists. > > If you have built Postgres with locale support, an easy way to get > corrupted indexes on text/char/varchar columns is to start the > postmaster with different locale environment variables at different > times. Different locales mean different logical sort orders, and > a btree index that is out of order is corrupt by definition. The > most common way of shooting yourself in the foot is to sometimes start > the postmaster from a boot script, and sometimes start it by hand from > a user login that has different locale environment than the boot script. > 7.1 will have some defenses against this, but in older releases you > have to be careful. > > regards, tom lane > -- x- kisix@swi.hu -x- attila.kevei@goodwill.hu -x- kisiksz@westel900.net -x