> > 3) Bug in ExecMergeJoin ??
> >    This is something that has *NOTHING* to do with the Having logic!
> >    Proof: Try the following query (without having my patch applied):
> >
> >                      ....
> >                      CleanUpSort(node->join.lefttree->lefttree);
> >                      CleanUpSort(node->join.righttree->lefttree);
> >               ....
> >                 }
> >
> >     In 'CleanUpSort()' the function 'psort_end()' gets called and
> >     closes down the sort, which is correct as long as no subselects
> >     are in use!
I looked at the Mariposa code, which has some fixes, and they have
removed the call to CleanUpSort in mergejoin, so that verifies the fix
is correct.  I am removing the entire CleanUpSort function and calls from
mergejoin.
--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)