Re: [HACKERS] UNION + GROUP BY bug located

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org, Bill Carlson <wcarlson(at)kinzemfg(dot)com>
Subject: Re: [HACKERS] UNION + GROUP BY bug located
Date: 1999-06-10 01:13:34
Message-ID: 199906100113.VAA17198@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-06-10 01:37:00 Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem
Previous Message Tom Lane 1999-06-10 00:56:42 UNION + GROUP BY bug located