> > IF foo IS NULL
> > THEN ...
> > ELSIF foo
> > THEN ...
> > ELSE ...
> > END IF;
>
> here the foo expression woll be executed twice
if you can use an immutable or stable function then the overhead would be
minimal as the system knows that it doesn't need to re-evaluate it.
regards
Iain