Re: Function does not return, but gives error.. - Mailing list pgsql-sql

From Michael Fuhr
Subject Re: Function does not return, but gives error..
Date
Msg-id 20050616124708.GA65633@winnie.fuhr.org
Whole thread Raw
In response to Function does not return, but gives error..  ("M.D.G. Lange" <mlange@dltmedia.nl>)
List pgsql-sql
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/


pgsql-sql by date:

Previous
From: "M.D.G. Lange"
Date:
Subject: Re: Function does not return, but gives error..
Next
From: grupos
Date:
Subject: Re: PostgreSQL and Delphi 6