On Thu, Jun 16, 2005 at 02:26:39PM +0200, M.D.G. Lange wrote:
>
> IF groupres = NULL
> THEN
> ...
> END IF;
> is not trapped...
Be sure to understand how NULL works in comparisons:
http://www.postgresql.org/docs/8.0/static/functions-comparison.html
SELECT NULL = NULL;?column?
----------
(1 row)
SELECT (NULL = NULL) IS TRUE;?column?
----------f
(1 row)
SELECT (NULL = NULL) IS FALSE;?column?
----------f
(1 row)
SELECT (NULL = NULL) IS NULL;?column?
----------t
(1 row)
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/