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 5B110D1B195 for ; Wed, 7 Jul 2004 16:58:32 -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 01052-10 for ; Wed, 7 Jul 2004 19:58:28 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 53EEED1B1D1 for ; Wed, 7 Jul 2004 16:58:26 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i67JwPi7006015 for ; Wed, 7 Jul 2004 19:58:25 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i67JZHbu001860 for pgsql-sql@postgresql.org; Wed, 7 Jul 2004 19:35:17 GMT Date: Wed, 07 Jul 2004 21:35:16 +0200 From: Hans de Bruin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-us, en MIME-Version: 1.0 X-Newsgroups: comp.databases.postgresql.sql Subject: Re: append columns that are null References: <40ec1043$0$559$e4fe514c@news.xs4all.nl> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Lines: 21 Message-ID: <40ec5075$0$34762$e4fe514c@news.xs4all.nl> X-Complaints-To: abuse@xs4all.nl To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.1 tagged_above=0.0 required=5.0 tests=NO_DNS_FOR_FROM X-Spam-Level: * X-Archive-Number: 200407/55 X-Sequence-Number: 18307 nobody wrote: > "Gerwin Philippo" wrote in message > news:40ec1043$0$559$e4fe514c@news.xs4all.nl... > >>I have function that appends 2 columns, like >>"new.field1 = new.field2||new.field3", >>but when field 3 is null, then the entire outcome is null, while I >>expected just field2, since when I append nothing to field2, I get >>field2, right? >>Is this standard behaviour, and if so, is there another append function >>that I can use that doesn't behave like this? 3 + unknown value = unknown value its also unknown if 3 is bigger, smaller or equal to an unknown value. -- Hans de Bruin http://eratosthenes.xs4all.nl