pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: m.woehling@barthauer.de
To: pgsql-bugs@postgresql.org
Subject: BUG #11304: UNION query with NULL values fails
Date: Thu, 28 Aug 2014 21:37:51 +0000
Message-ID: <20140828213751.2532.54130@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      11304
Logged by:          Markus Woehling
Email address:      m.woehling@barthauer.de
PostgreSQL version: 9.3.5
Operating system:   Windows Server 2008
Description:        

I want to "warm up" the bug reports "BUG #1453"
[http://permalink.gmane.org/gmane.comp.db.postgresql.bugs/7383] and "BUG
#5974"
[http://www.postgresql.org/message-id/201104122018.p3CKIlWR042915@wwwmaster.postgresql.org].

I need to build UNION queries with NULL values dynamically like in this
sample:
select null union all select null union all select 1;

This could be workaround:
select null union all (select null union all select 1);

But this workaround fails in this case:
select 1 union all (select null union all select null);

Because I don't know the "real" data type of the NULL values, I can't
specify the type like in this sample:
select 1 union all (select null::int union all select null::int);

I know that MSSQL, Oracle, MySQL, DB2 and Firebird don't have this problem.
So I'd really like to see this working in PostgreSQL as well.
Currently this problem hinders me from using PostgreSQL as DBMS in our
products.

Markus


-- 
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 (4+ messages)  latest in thread

Message-ID: <20140828213751.2532.54130@wrigleys.postgresql.org>
Permalink:  ../20140828213751.2532.54130@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20140828213751.2532.54130@wrigleys.postgresql.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 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: m.woehling@barthauer.de
  Subject: Re: BUG #11304: UNION query with NULL values fails
  In-Reply-To: <20140828213751.2532.54130@wrigleys.postgresql.org>
  References: <20140828213751.2532.54130@wrigleys.postgresql.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