Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 5A12D475CC1 for ; Tue, 4 Jun 2002 04:13:08 -0400 (EDT) Received: from necker.ac-rouen.fr (smtp.ac-rouen.fr [194.167.110.3]) by postgresql.org (Postfix) with ESMTP id C52B6475C69 for ; Tue, 4 Jun 2002 04:13:06 -0400 (EDT) Received: from s2ia27 (localhost.localdomain [127.0.0.1]) by necker.ac-rouen.fr (8.11.0/8.11.0) with ESMTP id g548D4J06022 for ; Tue, 4 Jun 2002 10:13:04 +0200 Content-Type: text/plain; charset="us-ascii" From: David BOURIAUD Organization: Inspection =?iso-8859-1?q?acad=E9mique=20de?= l'Eure To: pgsql-sql@postgresql.org Subject: Is this a feature ? Date: Tue, 4 Jun 2002 10:18:24 +0200 X-Mailer: KMail [version 1.4] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200206041018.24328.david.bouriaud@ac-rouen.fr> X-Archive-Number: 200206/20 X-Sequence-Number: 7985 Hi the list ! I've read the docs, and found that you could concatenate two or more strings in one select statement like this : select civ || name || forname as identity from person; This just works fine and returns rows with only one column named identity. So far, if one of the fields (civ, name or forname) is null, identity is null... That doesn't seems right, since it means that 1+2+0 = 0 !!!! Has anybody else seen the same strange behaviour ? And is there a way to work this around ? Please, don't answer me to use the function textcat (text, text), since it behaves the same and makes queries quite unreadeable... eg. select textcat ( textcat (civ, name), forname) as identity from person; is quite readeable, but when you add fields separator, it isn't. -- David BOURIAUD ---------------------------------------------------------- In a world without walls or fences, what use do we have for windows or gates ? ---------------------------------------------------------- ICQ#102562021