Re: select returns no line - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: select returns no line
Date
Msg-id Pine.LNX.4.30.0101231724380.788-100000@peter.localdomain
Whole thread Raw
In response to select returns no line  (Attila Kevei <attila.kevei@mail.goodwill.hu>)
List pgsql-sql
Attila Kevei writes:

> goodwill=>select * from users where user_login='test';
> user_id|user_login|user_passwd|user_exp
> -------+----------+-----------+--------
> (0 rows)
>
> goodwill=> select * from users where user_id=4;
> user_id|user_login|user_passwd  |user_exp
> -------+----------+-------------+--------
>       4|test      |0PDv7a2EESjZo|
> (1 row)

You probably started the postmaster with two different LC_COLLATE (locale
sort order) settings.  The setting that was active when you ran initdb
must be kept when you run the postmaster.

> goodwill=> update users set user_login=user_login where user_id=4;
> UPDATE
> 1
>
> goodwill=>select * from users where user_login='test';
> user_id|user_login|user_passwd  |user_exp
> -------+----------+-------------+--------
>       4|test      |0PDv7a2EESjZo|
> (1 row)

Yep, the update will fix the corrupted index (at least to the extent that
this particular case now works).

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-sql by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: monster query, how to make it smaller
Next
From: Tom Lane
Date:
Subject: Re: grouping by date increments