"Gerhard Dieringer" <DieringG(at)eba-haus(dot)de> writes:
> It's a known bug of plpgsql that if one arg is NULL, all other args
> are also assumed to be NULL. I think (hope) this will be fixed in a
> future version.
7.1. It is already fixed in current development sources.
BTW it's not actually plpgsql's fault, but that of the function-call
interface. The problem appears no matter what programming language
you write the function in.
regards, tom lane