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

From Avi Schwartz
Subject Nulls get converted to 0 problem
Date
Msg-id 99C3F7E0-96B4-11D7-AFDF-000393AE5044@CFFtechnologies.com
Whole thread Raw
Responses Re: Nulls get converted to 0 problem  (Andrew Sullivan <andrew@libertyrms.info>)
Re: Nulls get converted to 0 problem  ("scott.marlowe" <scott.marlowe@ihs.com>)
Re: Nulls get converted to 0 problem  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
Hi,

I have this very strange problem that I cannot figure out.

I am in the process of converting a Coldfusion MX application from SQL
Server to PostgreSQL 7.3.2 running on SuSE Linux 8.2.
Since Coldfusion has no support for real null, when a select returns a
null value, the value of the Coldfusion variable is set to "", even if
it a numeric value like int.

For example, the following query should display nothing in the
item_category column:

select * from item_catalog where item_category is null

With SQl Server 7, this works as expected, but with PostgreSQL, the
value Coldfusion is setting the integer variables to is 0 (zero) and
not "" as it should.  This of course is a big problem.  I checked with
other people using the combination of PostgreSQL and Coldfusion and
they cannot reproduce it.  This makes me think that there may be a
problem with my database as created.

Now the interesting thing is that if I use another tool to examine the
results, they do display null in this column.

At this point I pretty much lost.  Any idea what may the problem be?

Thanks,
Avi
--
Avi Schwartz
avi@CFFtechnologies.com


pgsql-general by date:

Previous
From: Jean-Luc Lachance
Date:
Subject: Re: CAST to integer problem
Next
From: "Jay O'Connor"
Date:
Subject: to copy a record