[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

PostgreSQL question relating to Zero versus NULL

Abraham Vionas

11/30/2004 7:43:00 AM

Hi,



Sorry to ask another question so soon - even before getting an answer to my
last question regarding my Apache trouble.



Other than my Apache + Rails problems, I can't figure out why setting a
column value in my Postgres table to 0 (as in zero) and then querying that
table for the value in that column returns a NULL.



Does anyone else know what's going on? This is happening from my Todo Rails
application (following the tutorial). I know it's not Rails because I can
see the NULL coming out of the DB from psql console.and I'm setting the
values from the psql console - just to ensure that nothing is getting mixed
up in between.



Anyone know what's going on here?



Regards, Abe

1 Answer

Edwin Eyan Moragas

11/30/2004 9:00:00 AM

0

On Tue, 30 Nov 2004 16:42:34 +0900, Abraham Vionas
<abe_ml@bozemantechmedic.com> wrote:
> Other than my Apache + Rails problems, I can't figure out why setting a
> column value in my Postgres table to 0 (as in zero) and then querying that
> table for the value in that column returns a NULL.
>
> Does anyone else know what's going on? This is happening from my Todo Rails
> application (following the tutorial). I know it's not Rails because I can
> see the NULL coming out of the DB from psql console.and I'm setting the
> values from the psql console - just to ensure that nothing is getting mixed
> up in between.

rails and your psql console uses different connections so:
are you in a transaction in the psql end? if you are, you need to commit.

from the rails end, i don't know how active record manages transactions so no
idea there.

eyan


--
http://ww...