pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: rajasekhar5c1@gmail.com <rajasekhar5c1@gmail.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #8613: getting null when null is concatenated with string
Date: Fri, 22 Nov 2013 11:40:58 -0800 (PST)
Message-ID: <1385149258.65373.YahooMailNeo@web162903.mail.bf1.yahoo.com> (raw)
In-Reply-To: <E1VjlAC-0001mF-6D@wrigleys.postgresql.org>
References: <E1VjlAC-0001mF-6D@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

"rajasekhar5c1@gmail.com" <rajasekhar5c1@gmail.com> wrote:

> when i fire below query on one of our servers
>
>     select null || 'query' ,'|'
>
> the result is null nothing is displayed
>
> when i fire the same query on another server which has same
> version of postgresql server
>
> i am getting result as
>
> query

This is not a bug.

For community PostgreSQL, NULL is the correct result.  It is what
is required by the SQL standard, since concatenating a known value
with an unknown value yields an unknown result.

> 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

However, you are not running community PostgreSQL, you are running
EDB PostgreSQL Plus Advanced Server (PPAS), which has an Oracle
compatibility mode which treats an empty string and NULL as
more-or-less the same thing.  Your best bet for such an issue would
be to open a support ticket with EDB.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)  latest in thread

Message-ID: <1385149258.65373.YahooMailNeo@web162903.mail.bf1.yahoo.com>
Permalink:  ../1385149258.65373.YahooMailNeo@web162903.mail.bf1.yahoo.com/
Also on:    postgresql.org/message-id/1385149258.65373.YahooMailNeo@web162903.mail.bf1.yahoo.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: kgrittn@ymail.com, rajasekhar5c1@gmail.com
  Subject: Re: BUG #8613: getting null when null is concatenated with string
  In-Reply-To: <1385149258.65373.YahooMailNeo@web162903.mail.bf1.yahoo.com>
  References: <E1VjlAC-0001mF-6D@wrigleys.postgresql.org> <1385149258.65373.YahooMailNeo@web162903.mail.bf1.yahoo.com>

* 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