Re: coalesce for null AND empty strings

Поиск
Список
Период
Сортировка
От Lew
Тема Re: coalesce for null AND empty strings
Дата
Msg-id DcidnV2vOdneh5DbnZ2dnUVZ_sapnZ2d@comcast.com
обсуждение исходный текст
Ответ на Re: coalesce for null AND empty strings  (Richard Huxton <dev@archonet.com>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "MaDog"
Дата:
Сообщение: PlPg/SQL
Следующее
От: "filippo"
Дата:
Сообщение: stored queries and quoted strings