Martijn van Oosterhout wrote:

On Thu, Jan 01, 2004 at 11:53:29PM +0100, Baldur Norddahl wrote:

Ok, but since this can be quite annoying and unexpected, could we get an
operator that does not use tristate logic but simply compares? Maybe == which
seems to be free :-)

So X==Y is true if X and Y are equal or both are null, false othervise.


Annoying, not really. It's actually extremely useful. It's useful having a
value which is never equal to anything else, not even itself. If you use it
to represent "unknown" it will work for you. If you try to use it for
anything else, it will bite you.

You could create a new operator, but that means you'll have difficulty
moving it to any database that doesn't have that operator (which is most of
them).

If you want it to match perhaps you should forget NULL and use '' (zero
length string) instead.

Don't mentioning the fact that for Oracle a zero length string is NULL! Isn't that funny ?

Regards
Gaetano Mendola

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to