Skip site navigation (1) Skip section navigation (2)

select NULL||'abc' returns empty string (or NULL)

From: Holger Marzen <holger(at)marzen(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: select NULL||'abc' returns empty string (or NULL)
Date: 2002-02-27 11:25:54
Message-ID: Pine.LNX.4.44.0202271223030.9979-100000@bluebell.marzen.de (view raw or flat)
Thread:
Lists: pgsql-general
I suppose that PostgreSQL insists that a NULL value cannot be
concatenated with a string. Can I cast this somehow? I noticed that
feature when I did a

select * from tab where col1||col2 ilike '%bla%'

and it did't find rows where one of the columns was NULL. Any ideas for
workarounds?

-- 
PGP/GPG Key-ID:
http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0xB5A1AFE1


Responses

pgsql-general by date

Next:From: Alexey BorzovDate: 2002-02-27 11:56:53
Subject: Re: select NULL||'abc' returns empty string (or NULL)
Previous:From: Jean-Michel POUREDate: 2002-02-27 10:22:29
Subject: MySQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group