select returns no line

From: kisix <attila(dot)kevei(at)goodwill(dot)hu>
To: pgsql-sql(at)postgresql(dot)org
Subject: select returns no line
Date: 2001-01-22 16:47:58
Message-ID: 3A6C643E.B4596D0A@goodwill.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

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).

Idea?

Thanks
Attila

********************************************************************************
Environment:

[PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc
2.95.2]

goodwill=>\d users
Table = users
+----------------------------------+----------------------------------+-------+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-------+
| user_id | int4 not null default nextval (
| 4 |
| user_login | varchar() not null
| 15 |
| user_passwd | varchar() not null
| 15 |
| user_exp | timestamp
| 4 |
+----------------------------------+----------------------------------+-------+
Indices: users_pkey

users_user_login_key

********************************************************************************
The problem:

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)

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)

--
x- kisix(at)swi(dot)hu -x- attila(dot)kevei(at)goodwill(dot)hu -x- kisiksz(at)westel900(dot)net
-x

Browse pgsql-sql by date

  From Date Subject
Next Message john whale 2001-01-22 17:29:49 DATE
Previous Message Stephan Richter 2001-01-22 06:20:14 Joining several tables