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

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 (view raw or flat)
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

pgsql-bugs by date

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

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