Subject: What's going on here?

From: "Dave Cramer" <[email-masked]>
Date: Thu, 26 Jul 2001 14:48:28 -0400

I can't seem to change any rows in this table. Are there locks somewhere
that I can look at or fix

ebox=# select version();
                           version                           
-------------------------------------------------------------
 PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.96
(1 row)

ebox=# select eitemcode,itemavail from inventory where itemavail = 1
limit 1;
 eitemcode | itemavail 
-----------+-----------
   6100122 |         1
(1 row)

ebox=# update inventory set itemavail=0 where eitemcode=6100122;
UPDATE 0

Thanks in advance,

Dave

---

From: Stephan Szabo <[email-masked]>
Date: Thu, 26 Jul 2001 12:21:54 -0700 (PDT)

> that I can look at or fix

Hmm, could it perhaps be a view (rather than a table)?  If it is a table,
are there any views or triggers on the table that might be interfering
with the update?

---

From: [email-masked] (J.H.M. Dassen (Ray))
Date: Thu, 26 Jul 2001 19:24:20 +0000 (UTC)

>                            version                           

I wouldn't trust that build for production uses; see
http://gcc.gnu.org/gcc-2.96.html .

> ebox=# update inventory set itemavail=0 where eitemcode=6100122;

What do you get with "select eitemcode,itemavail from inventory where
eitemcode=6100122"? "UPDATE 0" means no row matched the "where" clause.

If this select does return rows, something truely weird is happening. If it
does not return rows, there may be some kind of typing/casting issue at
work.

HTH,
Ray
-- 
Javascript is EVIL!
	keyweed

---

From: "Dave Cramer" <[email-masked]>
Date: Thu, 26 Jul 2001 15:46:23 -0400

ebox=# select eitemcode,itemavail from inventory where
eitemcode=6100122;
 eitemcode | itemavail 
-----------+-----------
   6100122 |         1
(1 row)

Dave

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]] On Behalf Of J.H.M. Dassen
(Ray)
Sent: July 26, 2001 3:24 PM
To: [email-masked]
Subject: [GENERAL] Re: What's going on here?

> limit 1;  eitemcode | itemavail
> -----------+-----------
>    6100122 |         1

If this select does return rows, something truely weird is happening. If
it does not return rows, there may be some kind of typing/casting issue
at work.

HTH,
Ray
-- 
Javascript is EVIL!
	keyweed

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

---

From: "Roderick A. Anderson" <[email-masked]>
Date: Thu, 26 Jul 2001 14:14:03 -0700 (PDT)

> ebox=# select eitemcode,itemavail from inventory where itemavail = 1

Did eitemcode get left padded with some whitespace character(s)?

Rod
Rod
-- 
                 Remove the word 'try' from your vocabulary ... 
                     Don't try.  Do it or don't do it ...
                                Steers try!

                                                            Don Aslett

---

From: Tom Lane <[email-masked]>
Date: Fri, 27 Jul 2001 01:56:49 -0400

Seems pretty weird.  May we see the full schema for the table?
"pg_dump -s -t tablename dbname" is the best way.

			regards, tom lane