Re: BUG #1677: Bug in select with Union - Mailing list pgsql-bugs

From Russell Smith
Subject Re: BUG #1677: Bug in select with Union
Date
Msg-id 200505241856.22936.mr-russ@pws.com.au
Whole thread Raw
In response to Re: BUG #1677: Bug in select with Union  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Mon, 23 May 2005 11:54 pm, Tom Lane wrote:
> "Julien Vallet" <julien.vallet@density-tech.com> writes:
> > The result is "ERROR:  UNION types text and bigint cannot be matched"
>
> This is the identical issue reported here:
> http://archives.postgresql.org/pgsql-bugs/2005-02/msg00008.php
> See also this thread:
> http://archives.postgresql.org/pgsql-general/2005-02/msg00693.php
>
> The short answer is that what you wrote is illegal per the SQL spec
> (which doesn't allow NULL to be used in ways where a type can't be
> ascribed immediately).  While we'd like to accept it, we have
> not figured out a rule that doesn't break the spec in other ways.
> For now I'd recommend casting the NULLs explicitly.

Can we spit out an error that is slightly more relevant?  Maybe print
a warning/error that NULL was used without a type?

Regards

Russell Smith
>    regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
>

pgsql-bugs by date:

Previous
From: Neil Conway
Date:
Subject: Re: BUG #1671: Long interval string representation rejected
Next
From: Szűcs Gábor
Date:
Subject: Re: could not devise a query plan