Re: coalesce for null AND empty strings

From: Lew <lew(at)nospam(dot)lewscanon(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: coalesce for null AND empty strings
Date: 2007-03-30 14:10:10
Message-ID: DcidnV2vOdneh5DbnZ2dnUVZ_sapnZ2d@comcast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ferdinand Gassauer wrote:
>> * looking through Google it IS a concern for many others and thus this
>> function should be distributed as default.

The mere fact that something is requested does not imply that the request
should be accepted. I'm sure there's a name for this fallacy, but I can't
think of it just now.

This is especially true when the common request stems from common ignorance.

Richard Huxton wrote:
> Hmm - I see it coming up occasionally, but usually where people are
> misusing NULLs.

This is why the request should be rejected. NULL has a specific semantic, and
it is most emphatically not the same as an empty string.

It is not wise to mess with the fundamental mathematics of SQL. Get used to
the fact that NULL is not empty string; embrace the fact and learn to love it.

-- Lew

In response to

Browse pgsql-general by date

  From Date Subject
Next Message William Gray 2007-03-30 15:43:08 Re: Some encoding trouble via libpq
Previous Message Max.Kaufmann 2007-03-30 13:53:56 job opportunity with Hedge Fund - NYC