X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id EC0889FB274 for ; Fri, 15 Sep 2006 05:45:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 28566-02 for ; Fri, 15 Sep 2006 08:44:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd-2317.dedibox.fr (sd-2317.dedibox.fr [88.191.17.192]) by postgresql.org (Postfix) with ESMTP id 8E0819FB272 for ; Fri, 15 Sep 2006 05:44:29 -0300 (ADT) Received: from sd-2317.dedibox.fr (localhost.localdomain [127.0.0.1]) by sd-2317.dedibox.fr (Postfix) with ESMTP id 439D9B0AA; Fri, 15 Sep 2006 10:44:40 +0200 (CEST) Received: from [10.168.168.40] (APuteaux-152-1-81-159.w86-205.abo.wanadoo.fr [86.205.82.159]) by sd-2317.dedibox.fr (Postfix) with ESMTP id EABA1AF9C; Fri, 15 Sep 2006 10:44:39 +0200 (CEST) Message-ID: <450A67E6.9070407@lelarge.info> Date: Fri, 15 Sep 2006 10:44:22 +0200 From: Guillaume Lelarge Reply-To: guillaume@lelarge.info Organization: PROGIMED User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Thunderbird/0.7.3 Mnenhy/0.6.0.104 MIME-Version: 1.0 To: Andreas Joseph Krogh Cc: pgsql-sql@postgresql.org Subject: Re: lower() not working correctly...? References: <200609151006.40801.andreak@officenet.no> In-Reply-To: <200609151006.40801.andreak@officenet.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200609/104 X-Sequence-Number: 26315 Andreas Joseph Krogh a ecrit le 15/09/2006 10:06: > I have the following query: > > select lower(firstname) || ' ' || lower(lastname) from person > > firstname and lastname are VARCHAR > > lower() returns NULL when firstname OR lastname is NULL, is this correct? > > This is 8.2devel from 24.08.2006. > NULL is an unkown value. lower of an unkown value is unknown... thus NULL. This is correct behavior. -- Guillaume.