X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 8CE379DCA1C for ; Wed, 8 Mar 2006 13:24:24 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38003-10 for ; Wed, 8 Mar 2006 13:24:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 32F3C9DCA06 for ; Wed, 8 Mar 2006 13:24:19 -0400 (AST) 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 k28HODw6087964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Mar 2006 10:24:16 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id k28HODBT046033; Wed, 8 Mar 2006 10:24:13 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id k28HODLD046032; Wed, 8 Mar 2006 10:24:13 -0700 (MST) (envelope-from mfuhr) Date: Wed, 8 Mar 2006 10:24:12 -0700 From: Michael Fuhr To: "Goulet, Dick" Cc: German Raul Hoyos Parravicino , pgsql-admin@postgresql.org Subject: Re: Fwd: Question Message-ID: <20060308172412.GB45820@winnie.fuhr.org> References: <4001DEAF7DF9BD498B58B45051FBEA650340B9B9@25exch1.vicorpower.vicr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4001DEAF7DF9BD498B58B45051FBEA650340B9B9@25exch1.vicorpower.vicr.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.122 required=5 tests=[AWL=0.122] X-Spam-Score: 0.122 X-Spam-Level: X-Archive-Number: 200603/83 X-Sequence-Number: 20840 On Wed, Mar 08, 2006 at 09:07:00AM -0500, Goulet, Dick wrote: > The syntax in Oracle is "is null" or "is not null" as in: > > select count(*) from module_master where gatekeeper_status is null; That works if you want to exclude those rows altogether. > And yes that does work in PostGreSql. Now if your talking about the > Oracle function NVL, for Null Value, no that does not work and I don't > see a similar function in PostGreSql. You could create one easily > enough. What does NVL do? From the examples I've seen it looks like COALESCE. Oracle themselves recommends COALESCE: http://www.oracle.com/technology/oramag/oracle/05-jul/o45sql.html "Oracle Database supports several functions that are similar to COALESCE. These include NVL2, NULLIF, and NVL. (Take time to read about these functions in the Oracle SQL Reference manual.) We recommend COALESCE over NVL, because COALESCE can handle more than just two arguments and it's part of the SQL standard. When COALESCE isn't enough, you may be able to find refuge in CASE expressions, which are also covered in Oracle SQL Reference." PostgreSQL supports CASE as well. -- Michael Fuhr