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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-general by date

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