PostgreSQL question relating to Zero versus NULL

A

Abraham Vionas

------=_NextPart_000_0019_01C4D675.79F87420
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit

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


------=_NextPart_000_0019_01C4D675.79F87420--
 
E

Edwin Eyan Moragas

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top