concatenation issue ( 8.4 ) - Mailing list pgsql-general

From Jonathan Vanasco
Subject concatenation issue ( 8.4 )
Date
Msg-id 96D5F280-01FA-4F57-ACF4-0B5C4E5E6EE9@2xlp.com
Whole thread Raw
Responses Re: concatenation issue ( 8.4 )
List pgsql-general
I have a table with
    name_first
    name_middle
    name_last

if i try concatenating as such:
    SELECT
        name_first || ' ' || name_middle || ' ' || name_last
    FROM
        mytable
    ;

I end up with NULL as the concatenated string whenever any of the
referred fields contain a NULL value

I tried some text conversion and explicit casting , but that didn't work

What am I doing wrong ?

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: pgadmin is changing pgpass.conf
Next
From: Raymond O'Donnell
Date:
Subject: Re: concatenation issue ( 8.4 )