Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CCB01133655C for ; Thu, 14 Apr 2011 13:06:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 42575-01 for ; Thu, 14 Apr 2011 16:05:55 +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 AE3A41337B83 for ; Thu, 14 Apr 2011 13:05:54 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 14 Apr 2011 11:05:53 -0500 Message-Id: <4DA6D50E020000250003C83A@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 14 Apr 2011 11:05:50 -0500 From: "Kevin Grittner" To: "Mike Fowler" ,"Tom Lane" Cc: "Jeff Wu" , 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> In-Reply-To: <4DA711B6.4060306@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/94 X-Sequence-Number: 30013 Mike Fowler wrote: > SELECT 1,null,null > UNION > SELECT 2,3,null > UNION > SELECT 3,null,4 > In Oracle I get a delicious error message: > > Error: ORA-00923: FROM keyword not found where expected For Oracle, shouldn't that be: SELECT 1,null,null FROM DUAL UNION SELECT 2,3,null FROM DUAL UNION SELECT 3,null,4 FROM DUAL -Kevin