Re: string concatenator || and NULL values

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Roberto João Lopes Garcia <roberto(at)mha(dot)com(dot)br>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: string concatenator || and NULL values
Date: 2004-07-01 23:02:19
Message-ID: 20040701230219.GA9893@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, Jul 01, 2004 at 16:42:29 -0300,
Roberto João Lopes Garcia <roberto(at)mha(dot)com(dot)br> wrote:
>
> When I use string concatenator || and there are fields of type date whith NULL values
> the result is an enpty string. Please see example:

This isn't a bug. If either operand of || is NULL, then the result is NULL.
You probably want to use the coalesce function to change NULLs to empty
strings.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2004-07-01 23:03:29 Re: string concatenator || and NULL values
Previous Message Tom Lane 2004-07-01 22:48:46 Re: VACUUM analyze verbose is skipping tables