Re: [HACKERS] Misleading Error Message - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Misleading Error Message
Date
Msg-id 199905171823.OAA24473@candle.pha.pa.us
Whole thread Raw
In response to Misleading Error Message  (Kristofer Munn <kmunn@munn.com>)
List pgsql-hackers
> Hi all.  Was working tonight and ran into the following error.  Doing a
> union between two selects (to get around the lack of outer joins - hint
> hint), I was getting the error:
> 
>         ERROR: Each UNION clause must have the same number of columns
> 
> Upon examining the SQL statement in question, I verified that it did,
> indeed, have the same number of columns.  After some fiddling, I found the
> actual problem was that I was doing an ORDER BY on a column which was not
> being included in the two select statements.  Unfortunately, the error
> message wasn't pointing at that.
> 
> I'm not sure if this is just a simple change or implies other problems
> with the parser but I thought I'd toss it out onto the pile.


This now fixed.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Misleading Error Message
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] v6.5 release ToDo