Обсуждение: trouble with null

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

trouble with null

От
Alexander Stetsenko
Дата:
Hello all

I try to call such plpgsql function : do_something(int,int,date)
All works if I call do_something(1,4,'01-01-2000');
but if do_something(1,4,null) then inside function $1 and $2 is null
Why ? :-(
Thank you !!!


Re: trouble with null

От
Tom Lane
Дата:
Alexander Stetsenko <as@anapa.org.ru> writes:
> I try to call such plpgsql function : do_something(int,int,date)
> All works if I call do_something(1,4,'01-01-2000');
> but if do_something(1,4,null) then inside function $1 and $2 is null

Deficiency in the function-manager design: there's only one NULL flag
for all of the inputs :-(.  What's worse, if any of the inputs are NULL
then the function's result will be taken as NULL no matter what you
return!

This will require a major code overhaul to fix; it's currently planned
to happen for 7.1.
        regards, tom lane