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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: "Mike Fowler" <mike(at)mlfowler(dot)com>, "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 21:48:00
Message-ID: 21368.1302817680@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> Mike Fowler <mike(at)mlfowler(dot)com> wrote:
>> So to summarise, Oracle and PostgreSQL need minor tweaks to run
>> cleanly and SQLServer and MySQL do not.

> That means that all three of the databases you tested have
> extensions to the standard similar to what is being contemplated for
> PostgreSQL.

Uh, no, it proves they all extend the standard to allow NULL to be
written without an immediate cast. Mike's test really fails to prove
anything about the point at hand, which is what data type is being
imputed to the inner UNION.

I don't know those other DBMSes well enough to suggest a test that would
be definitive on the point, though. We'd need something where the
choice of datatype is material to the final visible result, and at least
in PG that requires some knowledge of not-very-standard behaviors.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Kevin Grittner 2011-04-14 22:13:46 Re: BUG #5974: UNION construct type cast gives poor error message
Previous Message Kevin Grittner 2011-04-14 21:28:40 Re: BUG #5974: UNION construct type cast gives poor error message