Re: lower() not working correctly...? - Mailing list pgsql-hackers

From Mario Weilguni
Subject Re: lower() not working correctly...?
Date
Msg-id FA095C015271B64E99B197937712FD020E4B0CB0@freedom.grz.icomedias.com
Whole thread Raw
In response to lower() not working correctly...?  (Andreas Joseph Krogh <andreak@officenet.no>)
List pgsql-hackers
This works as intended. Try this:
select coalesce(lower(firstname), '') || ' ' || coalesce(lower(lastname), '') from person

Concating something unknown (=NULL) and a string = unknown (=NULL)



-----Ursprüngliche Nachricht-----
Von: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-owner@postgresql.org] Im Auftrag von Andreas Joseph Krogh
Gesendet: Freitag, 15. September 2006 09:53
An: pgsql-hackers@postgresql.org
Betreff: [HACKERS] lower() not working correctly...?

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?



pgsql-hackers by date:

Previous
From: Andreas Joseph Krogh
Date:
Subject: lower() not working correctly...?
Next
From: "Magnus Hagander"
Date:
Subject: Re: Build v8.1.4 with VC++ 2005