Re: + operator with a possible NULL operand

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: + operator with a possible NULL operand
Дата
Msg-id 20030529111659.GC11002@wolff.to
обсуждение исходный текст
Ответ на Re: + operator with a possible NULL operand  ("Vincent Hikida" <vhikida@inreach.com>)
Список pgsql-novice
On Wed, May 28, 2003 at 23:43:19 -0700,
  Vincent Hikida <vhikida@inreach.com> wrote:
>
> That is
>
> SELECT SUM(numvar) FROM tablex
>
> Will treat any numvar which are null as if they were a zero. However, the
> following will not treat it as zero but non-existent.

Aggragates (except for count(*)) will skip any row for which the expression
is null. For sum() that turns out to be equivalent to treating the number
as zero because of the way math works. But the function isn't actually
treating nulls as zeros.

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

Предыдущее
От: "M. Bastin"
Дата:
Сообщение: MD5 salt
Следующее
От: Tom Lane
Дата:
Сообщение: Re: MD5 salt