Re: NULLS and string concatenation

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Don Drake <dondrake(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: NULLS and string concatenation
Date: 2004-11-19 17:53:33
Message-ID: 20041119175333.GA42361@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Nov 19, 2004 at 11:45:43AM -0600, Bruno Wolff III wrote:
> On Fri, Nov 19, 2004 at 11:12:38 -0600, Don Drake <dondrake(at)gmail(dot)com> wrote:
> >
> > I was able to work around the problem by using COALESCE (and casting
> > variables since it wants the same data types passed to it).
>
> This is what you should do.

If you don't mind using a non-standard feature, another possibility
would be to create an operator similar to || that COALESCEs NULLs
into empty strings.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Don Drake 2004-11-19 18:40:02 Re: NULLS and string concatenation
Previous Message Richard Huxton 2004-11-19 17:48:34 Re: NULLS and string concatenation