Re: Nulls get converted to 0 problem - Mailing list pgsql-general

From Avi Schwartz
Subject Re: Nulls get converted to 0 problem
Date
Msg-id 7595EFE6-96D3-11D7-8FA1-000393AE5044@CFFtechnologies.com
Whole thread Raw
In response to Nulls get converted to 0 problem  (Avi Schwartz <avi@CFFtechnologies.com>)
List pgsql-general
On Wednesday, Jun 4, 2003, at 15:55 America/Chicago, scott.marlowe
wrote:

> On Wed, 4 Jun 2003, Avi Schwartz wrote:
>
>>
>> On Wednesday, Jun 4, 2003, at 13:48 America/Chicago, scott.marlowe
>> wrote:
>>
>> I do not store a '' or "" into an integer column.  This is how CF does
>> it when it gets a null value from the database.
>
> So, CF is letting you store NULLS?  Or is it coercing them to 0 before
> storage?

No, the value in the database IS null.  When I do the select, it seems
that CF turns the null integers into the value 0.

> I'm gonna guess that the real problem is that cold fusion knows JUST
> enough about postgresql to be dangerous, and it is storing 0 in those
> fields when you tell it to store NULL.  Since it stores it as 0, it
> returns it as 0.  If you were to run an update statement on that table
> to
> set the values that are 0 to NULL, it would probably work as you want.
>
> Again, this is a guess.

I have a feeling this has something to do with the JDBC driver, again,
just a feeling.

I posted a question also on the Macromedia forums to see if I can
verify that the problem exists only on my installation and if it works
for them to find out what JDBC driver version they are using.
>> Yes, I am running the latest SP.  However, I am not sure yet where is
>> the problem since CF works as expected with other databases.
>
> I repeat...
>
> A database application language that doesn't understand NULLs is
> broken, and needs to be fixed.
>
> Just because it works with other databases doesn't mean it's not
> broken,
> just that the other databases will let you do something you shouldn't
> be
> allowed to do.

But that does not help me or any other company that wants to use
PostgreSQL with CF and I am sure Micromedia will tell me that
PostgreSQL is broken since they have no problem with other databases.

Avi
--
Avi Schwartz
avi@CFFtechnologies.com


pgsql-general by date:

Previous
From: Avi Schwartz
Date:
Subject: Is jdbc.postgresql.org down?
Next
From: "scott.marlowe"
Date:
Subject: Re: Nulls get converted to 0 problem