Re: PL/PGSQL question

Поиск
Список
Период
Сортировка
От Jean-Christian Imbeault
Тема Re: PL/PGSQL question
Дата
Msg-id 3E27A0FB.30400@mega-bucks.co.jp
обсуждение исходный текст
Ответ на PL/PGSQL question  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список pgsql-general
Tom Lane wrote:
>
> SUM() over no rows returns NULL, not zero, per the SQL spec.

I knew that, but didn't see the implications ... i.e. "IF FOUND" always
returns true ...

 > Try testing total_sales for NULL instead.

I was thinking of that but I declared it of type INTEGER. I thought it
made no sense to have an integer with a NULL value but it it works, I'm
happy :)

Thanks!

Jc


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PL/PGSQL question
Следующее
От: Jean-Christian Imbeault
Дата:
Сообщение: PL/PGSQL: another Q