X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DC6AB475458 for ; Wed, 9 Apr 2003 10:14:50 -0400 (EDT) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 28535474E42 for ; Wed, 9 Apr 2003 10:14:50 -0400 (EDT) Received: by news.hub.org (Postfix, from userid 8) id EF0F543A89E; Wed, 9 Apr 2003 10:14:49 -0400 (EDT) From: Michal Taborsky X-Newsgroups: comp.databases.postgresql.sql Subject: Concatenating does not work properly Date: Wed, 09 Apr 2003 16:14:41 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 28 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; cs-CZ; rv:1.3) Gecko/20030312 X-Accept-Language: cs, en-us, en To: pgsql-sql@postgresql.org X-Spam-Status: No, hits=-12.1 required=5.0 tests=BAYES_10,USER_AGENT_MOZILLA_UA autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/141 X-Sequence-Number: 12842 Hello, I am facing a problem I cannot really explain to myself. I have a table with personal data which has columns surname, firstname, secondname, title and I want to do a simple select like this: SELECT (surname || ', ' || firstname || ' ' || secondname) as fullname FROM person For some rows (from what I recognised it is with rows, which have the title column empty) it works, for some it returns empty string: akcent=# SELECT (surname || ', ' || firstname || ' ' || secondname) as fullname, title_pre, surname, firstname, secondname FROM person; fullname | title_pre | surname | firstname | secondname -----------------------+-----------+----------+-----------+------------ | Ing. | Taborsky | Michal | | Ing. | Barta | David | Novak, Josef | | Novak | Josef | Saroch, Adrian Walter | | Saroch | Adrian | Walter (4 rows) Is that a bug or am I missing something ? Thanks, Michal