z

text/plain

Filename: z
Type: text/plain
Part: 0
Message: call plpgsql function bug! (set arguments to NULL)
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=#