Re: [HACKERS] UNION + GROUP BY bug located - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] UNION + GROUP BY bug located
Date
Msg-id 199906100113.VAA17198@candle.pha.pa.us
Whole thread Raw
In response to UNION + GROUP BY bug located  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> The cause is that plan_union_queries() is failing to clear out the
> groupclause before it returns control to union_planner, so the GROUP BY
> gets applied twice, once to the subselect and once (incorrectly) to the
> result of the UNION.  (This wouldn't have happened with a less klugy
> representation for UNION parsetrees, but I digress.)  You can see this
> happening if you look at the EXPLAIN output; the coredump only happens
> at execution time.

Is going to be similar to LIKE indexing, where everyone beats me up
about it, but the code remains unchanged because no one can think of a
better/cleaner idea?  But i digress...  :-)

--  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: Tom Lane
Date:
Subject: UNION + GROUP BY bug located
Next
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem