Обсуждение: call plpgsql function bug! (set arguments to NULL)

Поиск
Список
Период
Сортировка

call plpgsql function bug! (set arguments to NULL)

От
Dmitry Gercog
Дата:
Hi!

I'm found that call function has bug:
some function have more than one arguments and
if one argument is NULL, then all other arguments
is NULL too! But function calling only with one
NULL arguments. Why?!

My system Linux Slackware 7.0, Postgres 7.0.2.
kernel 2.2.16


log file attached.

Dmitry Gercog.mybase=# select version();
                                 version
--------------------------------------------------------------------------
 PostgreSQL 7.0.2 on i686-pc-linux-gnulibc1, compiled by gcc egcs-2.91.66
(1 row)

mybase=# CREATE FUNCTION tst_func(int4, int4) RETURNS INT4 AS '
mybase'#   DECLARE
mybase'#   BEGIN
mybase'#     RAISE NOTICE ''{%, %}'', $1, $2;
mybase'#     RETURN $1 + $2;
mybase'#   END;
mybase'# ' LANGUAGE 'plpgsql';
CREATE
mybase=# select tst_func(1,2);
NOTICE:  {1, 2}
 tst_func
----------
        3
(1 row)

mybase=# select tst_func(1,NULL);
NOTICE:  {<NULL>, <NULL>}
 tst_func
----------

(1 row)

mybase=#