pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: nobody <nobody@nowhere.near.here>
To: pgsql-sql@postgresql.org
Subject: Re: append columns that are null
Date: Thu, 8 Jul 2004 09:53:41 +0100
Message-ID: <ccj224$1jq7$1@news.hub.org> (raw)
References: <40ec1043$0$559$e4fe514c@news.xs4all.nl>
	<cch4kt$1i5s$1@news.hub.org>
	<40ecf718$0$36169$e4fe514c@news.xs4all.nl>

You are welcome. Only if all problems were that simple ;-)...
"Gerwin Philippo" <gerwin@vernet.nl> wrote in message
news:40ecf718$0$36169$e4fe514c@news.xs4all.nl...
> THX! didn't know that one yet :)
>
> nobody wrote:
> > "Gerwin Philippo" <gerwin@vernet.nl> wrote in message
> > news:40ec1043$0$559$e4fe514c@news.xs4all.nl...
> >
> >>I have function that appends 2 columns, like
> >>"new.field1 = new.field2||new.field3",
> >>but when field 3 is null, then the entire outcome is null, while I
> >>expected just field2, since when I append nothing to field2, I get
> >>field2, right?
> >>Is this standard behaviour, and if so, is there another append function
> >>that I can use that doesn't behave like this?
> >
> >
> > COALESCE is your friend...
> >
> >





view thread (6+ messages)  latest in thread

Message-ID: <ccj224$1jq7$1@news.hub.org>
Permalink:  ../ccj224$1jq7$1@news.hub.org/
Also on:    postgresql.org/message-id/ccj224$1jq7$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: nobody@nowhere.near.here
  Subject: Re: append columns that are null
  In-Reply-To: <ccj224$1jq7$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox