Re: plpgsql loop not returning value

Поиск
Список
Период
Сортировка
От Josh Close
Тема Re: plpgsql loop not returning value
Дата
Msg-id 4a0cafe204101607301152c6d2@mail.gmail.com
обсуждение исходный текст
Ответ на Re: plpgsql loop not returning value  (Michael Fuhr <mike@fuhr.org>)
Ответы Re: plpgsql loop not returning value  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
On Sat, 16 Oct 2004 00:59:34 -0600, Michael Fuhr <mike@fuhr.org> wrote:
> Add some RAISE INFO statements to print variables' values at key
> places.  I wonder if one of your SUMs is returning NULL, causing
> your addition to evaluate to NULL.  If so, then perhaps you should
> use COALESCE to turn those NULLs into zeros.
>
> If I've misunderstood the problem then please clarify.
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/

Thanks. That's exactly what was happening. I'm still new to postgres.
This is actually the first function I've wrote. I didn't even know
about RAISE or COALESCE. I added them both and it works great now!

Thanks.

-Josh

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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Avoiding sequential scans with OR join condition
Следующее
От: "Mark Dexter"
Дата:
Сообщение: Re: Complex Update Queries with Fromlist