From: | "Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com> |
---|---|
To: | "Richard Huxton" <dev(at)archonet(dot)com> |
Cc: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Unable to Update a Record |
Date: | 2005-08-01 18:51:12 |
Message-ID: | 8C5D1947714C254FBA98D176B86DEAB8AA4CCB@XCH-SW-3V1.sw.nos.boeing.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Richard,
Thank you so MUCH. I was able to delete the record by using the OID
method that you mentioned in (2).
Thanks again.
Mary Wang
-----Original Message-----
From: Richard Huxton [mailto:dev(at)archonet(dot)com]
Sent: Monday, August 01, 2005 9:44 AM
To: Wang, Mary Y
Cc: Joshua D. Drake; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Unable to Update a Record
Wang, Mary Y wrote:
> Sorry, that I didn't explain my problem very clearly.
> Anyway, here is the deal:
>
> I'm the admin for the database, so, I've all the privileges of
> updating, deletion, and reviewing and et.
>
> When I tried to select based on the bemsid condition, TWO ROWS
> returned:
>
> select * from users where bemsid=949762;
>
> user_id | user_name | email | user_pw |
realname
> 4215 | 949762 | john(dot)a(dot)hoff(at)boeing(dot)com | | Hoff, John A
|
>
> But when I tried select user_id=4215, the result return 0 rows:
>
> select * from users where user_id=4215;
> user_id | user_name | email | user_pw | realname | status | shell |
> -----+----------------------+---------------------
> (0 rows)
>
> I'm really confused. I want to delete user_id=4215 because it is
> causing me login errors. But I can't select, update, delete that
> record. I'm not sure if that record really exist.
1. What type is "user_id"?
If it's a text-type, there could be unseen spaces interfering.
2. Try selecting the OID too (SELECT oid,* FROM ...) with your first
query, then use that oid in your where clause. Can you see it now? Of
course, this assumes you have oids defined for this table.
3. Have you tried re-indexing the table (REINDEX TABLE users) It's
possible the index has become corrupted while the data is fine.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Siegmar | 2005-08-01 19:28:07 | Problem with dropping a tablespace |
Previous Message | Tino Wildenhain | 2005-08-01 17:54:12 | Re: PostgreSQL vs. MySQL |