Radek Kanovsky <radekk@uh.cz> writes:
> It happens that when some argument is NULL, than all argument get NULL.
> It works correctly only when all arguments are not NULL.
> How can I mix NULL and DATE values in arguments?
Right now, you can't. The function-call interface inside Postgres
is misdesigned (in several ways, but the one that's important here
is that only one argument-is-NULL flag gets passed to the function
from the expression evaluator).
Fixing this is on the to-do list, and should get done for 6.6 or 6.7.
regards, tom lane