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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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 Content-Type Size
bug-5974.patch text/x-diff 803 bytes

In response to

Responses

Browse pgsql-bugs by date

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