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

Re: BUG #5974: UNION construct type cast gives poor error message

From: Mike Fowler <mike(at)mlfowler(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Wu <jwu(at)atlassian(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5974: UNION construct type cast gives poor error message
Date: 2011-04-14 16:47:37
Message-ID: 4DA72529.7080505@mlfowler.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On 14/04/11 17:05, Kevin Grittner wrote:
> SELECT 1,null,null FROM DUAL
> UNION
> SELECT 2,3,null FROM DUAL
> UNION
> SELECT 3,null,4 FROM DUAL
Sadly I can't profess to knowing Oracle, however if I run the query as 
suggested I get:

--------------------
1 | NULL   | NULL
--------------------
1 | <null> | <null>
2 | 3      | <null>
3 | <null> | 4

So to summarise, Oracle and PostgreSQL need minor tweaks to run cleanly 
and SQLServer and MySQL do not. Given that the change for PostgreSQL is 
so minor, I vote for changing the error message as Jeff suggests in the 
interim to help users while the standards argument continues. Patch 
attached.

Regards,

-- 
Mike Fowler
Registered Linux user: 379787


Attachment: bug-5974.patch
Description: text/x-diff (803 bytes)

In response to

Responses

pgsql-bugs by date

Next:From: qintaoDate: 2011-04-14 20:57:12
Subject: BUG #5979: postgres service cannot be started if database is located in NAS
Previous:From: Kevin GrittnerDate: 2011-04-14 16:05:50
Subject: Re: BUG #5974: UNION construct type cast gives poor error message

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