X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C749052943 for ; Thu, 16 Jun 2005 09:47:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34410-08 for ; Thu, 16 Jun 2005 12:47:16 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id F0991528AA for ; Thu, 16 Jun 2005 09:47:15 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j5GCl8oC068494 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Jun 2005 06:47:11 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j5GCl8ss065664; Thu, 16 Jun 2005 06:47:08 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j5GCl8SI065663; Thu, 16 Jun 2005 06:47:08 -0600 (MDT) (envelope-from mfuhr) Date: Thu, 16 Jun 2005 06:47:08 -0600 From: Michael Fuhr To: "M.D.G. Lange" Cc: pgsql-sql@postgresql.org Subject: Re: Function does not return, but gives error.. Message-ID: <20050616124708.GA65633@winnie.fuhr.org> References: <42B16FFF.8050009@dltmedia.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42B16FFF.8050009@dltmedia.nl> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.108 tagged_above=0 required=5 tests=AWL, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200506/188 X-Sequence-Number: 21789 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/