pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: M.D.G. Lange <mlange@dltmedia.nl>
Cc: pgsql-sql@postgresql.org
Subject: Re: Function does not return, but gives error..
Date: Thu, 16 Jun 2005 06:47:08 -0600
Message-ID: <20050616124708.GA65633@winnie.fuhr.org> (raw)
In-Reply-To: <42B16FFF.8050009@dltmedia.nl>
References: <42B16FFF.8050009@dltmedia.nl>

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/



view thread (5+ messages)

Message-ID: <20050616124708.GA65633@winnie.fuhr.org>
Permalink:  ../20050616124708.GA65633@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050616124708.GA65633@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, mlange@dltmedia.nl
  Subject: Re: Function does not return, but gives error..
  In-Reply-To: <20050616124708.GA65633@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox