Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B9A091337B83 for ; Thu, 14 Apr 2011 18:28:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 71363-07 for ; Thu, 14 Apr 2011 21:28:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id C76A81337B6E for ; Thu, 14 Apr 2011 18:28:44 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 14 Apr 2011 16:28:44 -0500 Message-Id: <4DA720B8020000250003C856@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 14 Apr 2011 16:28:40 -0500 From: "Kevin Grittner" To: "Mike Fowler" Cc: "Jeff Wu" ,, "Tom Lane" Subject: Re: BUG #5974: UNION construct type cast gives poor error message References: <201104122018.p3CKIlWR042915@wwwmaster.postgresql.org> <9799.1302719551@sss.pgh.pa.us> <4DA711B6.4060306@mlfowler.com> <4DA6D50E020000250003C83A@gw.wicourts.gov> <4DA72529.7080505@mlfowler.com> In-Reply-To: <4DA72529.7080505@mlfowler.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/96 X-Sequence-Number: 30015 Mike Fowler wrote: > So to summarise, Oracle and PostgreSQL need minor tweaks to run > cleanly and SQLServer and MySQL do not. The FROM DUAL in Oracle has nothing to do with the issue at hand. That is just because they always require a FROM clause on every SELECT. DUAL is a special table with one row you can use when you just want to select a literal. That means that all three of the databases you tested have extensions to the standard similar to what is being contemplated for PostgreSQL. If nothing else, adding such an extension would ease migration from those other products, but I think it would prevent some user confusion and posts to the -bugs list, too. -Kevin