Re: BUG #8613: getting null when null is concatenated with string

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rajasekhar5c1(at)gmail(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8613: getting null when null is concatenated with string
Date: 2013-11-22 19:53:45
Message-ID: 24235.1385150025@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

rajasekhar5c1(at)gmail(dot)com writes:
> when i fire below query on one of our servers
> select null || 'query' ,'|'
> the result is null nothing is displayed

That's the expected result.

> when i fire the same query on another server which has same version of
> postgresql server i am getting result as
> query

Interesting. I think this is what would be expected in Oracle, which
thinks that null and empty string are the same thing.

> postgres version on both servers are
> 1) EnterpriseDB 9.2.1.3 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.1.2
> 20080704 (Red Hat 4.1.2-52), 32-bit 2) EnterpriseDB 9.2.1.3 on
> x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat
> 4.1.2-52), 64-bit

Well, I think you'd need to take that up with EnterpriseDB. I don't
know anything about what they do to Postgres' null handling, but it
wouldn't surprise me to hear that they've kluged it up to more nearly
match Oracle's non-standards-compliant behavior.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-11-22 19:56:36 Re: BUG #8612: Truncate did not release disk space
Previous Message Kevin Grittner 2013-11-22 19:40:58 Re: BUG #8613: getting null when null is concatenated with string