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-29 22:44:36
Message-ID: tMWdne7U_rjJ3JHbnZ2dnUVZ_oDinZ2d@comcast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ferdinand Gassauer wrote:
> it would be great to have a coalesce2 function which treats empty strings as
> null values.

I disagree, it would be the opposite of "great". "" is a /known/ value and not
in the same semantic space as NULL at all.

If you really feel you need such a function, though, why don't you write one?

I recommend sticking with the SQL semantics instead of trying to change them.

-- Lew

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-29 23:35:45 Re: COPY command details
Previous Message Pete 2007-03-29 22:04:08 Re: Oracle to PSQL function