Re: Nulls get converted to 0 problem

From: Jon Earle <je_pgsql(at)kronos(dot)honk(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Nulls get converted to 0 problem
Date: 2003-06-05 13:39:04
Message-ID: Pine.LNX.4.55.0306050931270.16042@kronos.honk.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 4 Jun 2003 terry(at)ashtonwoodshomes(dot)com wrote:

> Oracle *incorrectly* interprets blank (empty) strings as NULL. They are NOT
> the same. A string of zero characters is a string nonetheless. A NULL is
> "the absence of value", which equals nothing (theoretically not even another
> NULL).

If you're testing a value, you're testing to see if there's something in
there or not - what difference does it make if the variable contains 0, ""
or NULL?

Why not adhere to the practices inherent (and thus anticipated by
developers) in other languages (C comes to mind) where 0, NULL and "" are
equivalent?

Cheers!

--
Jon Earle

SAVE FARSCAPE http://www.savefarscape.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joel Rodrigues 2003-06-05 13:52:00 Re: regular expression question
Previous Message Nigel J. Andrews 2003-06-05 13:38:43 large objects