Re: Function does not return, but gives error..

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "M(dot)D(dot)G(dot) Lange" <mlange(at)dltmedia(dot)nl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Function does not return, but gives error..
Date: 2005-06-16 12:47:08
Message-ID: 20050616124708.GA65633@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message grupos 2005-06-16 12:54:21 Re: [SQL] PostgreSQL and Delphi 6
Previous Message M.D.G. Lange 2005-06-16 12:43:10 Re: Function does not return, but gives error..