Re: BUG #14184: Function is running correct but not showing output

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: BUG #14184: Function is running correct but not showing output
Дата
Msg-id CACjxUsMnaCtqyrWN=-zx=Xm6Yj9cZ=7H0XC9_PGY5RRGWFJ7ww@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #14184: Function is running correct but not showing output  (zzia88@gmail.com)
Список pgsql-bugs
On Mon, Jun 13, 2016 at 8:40 AM,  <zzia88@gmail.com> wrote:

> -----<<<<<<My function Coding>>>>----
> CREATE OR REPLACE FUNCTION FACTORIAL(IN NUM BIGINT,OUT FACT BIGINT) AS $$
> DECLARE
>         FACT BIGINT;
>  BEGIN
>         FOR I IN REVERSE 1..NUM LOOP
>                 FACT:=FACT*I;
>         END LOOP;
> END;
> $$ LANGUAGE plpgsql;
> -----<<<<<<<<<<<<>>>>>>>>>>>>>-----
> SELECT* FROM FACTORIAL(5);
>
> IT SHOWING NULL VALUE...

FACT is NULL on declaration.  NULL (unknown) multiplied by anything is NULL.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: torben@dannhauer.de
Дата:
Сообщение: BUG #14185: Indentation error in win32.mak let libpq compile fail on USE_OPENSSL=1 -- fix available
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #14184: Function is running correct but not showing output