From: Attila Kevei <attila.kevei@goodwill.hu>
To: pgsql-sql@postgresql.org
Subject: select returns no line
Date: Tue, 23 Jan 2001 12:42:27 +0100
Message-ID: <3A6D6E23.71BF2301@goodwill.hu> (raw)
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@swi.hu -x- attila.kevei@goodwill.hu -x- kisiksz@westel900.net -x
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: attila.kevei@goodwill.hu
Subject: Re: select returns no line
In-Reply-To: <3A6D6E23.71BF2301@goodwill.hu>
References: <3A6D6E23.71BF2301@goodwill.hu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox