Okay, I've been able to reproduce the problem here.  Looks like the
eqjoinsel math is not wrong, exactly, but small roundoff errors are
causing the logic to do unreasonable things.  I think
get_att_numdistinct needs to round its result to an integer, and
probably there needs to be some clamping of computed probabilities to
the 0..1 range (otherfreq1 is coming out about -4.4703483581542969e-08
in this example, which should be clamped to 0).

Will have a fix late tonight or tomorrow.

Thanks for the example case!

			regards, tom lane

Wed, 02 Jan 2002 19:02:51 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: bug in join? 
Thanks Tom!

On Wed, 2 Jan 2002, Tom Lane wrote:

> Okay, I've been able to reproduce the problem here.  Looks like the
> eqjoinsel math is not wrong, exactly, but small roundoff errors are
> causing the logic to do unreasonable things.  I think
> get_att_numdistinct needs to round its result to an integer, and
> probably there needs to be some clamping of computed probabilities to
> the 0..1 range (otherfreq1 is coming out about -4.4703483581542969e-08
> in this example, which should be clamped to 0).
>
> Will have a fix late tonight or tomorrow.
>
> Thanks for the example case!
>
> 			regards, tom lane
>

-- 
Laurette Cisneros
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
Passenger Information Everywhere


Wed, 2 Jan 2002 16:12:53 -0800 (PST)
Laurette Cisneros <laurette@nextbus.com>
Re: bug in join? 
Okay, I've committed a fix to CVS.  The easiest way for you to pick it
up is probably to grab tonight's nightly snapshot,
ftp://ftp.us.postgresql.org/dev/postgresql-snapshot.tar.gz
(or a closer ftp mirror if you have one).

			regards, tom lane

Wed, 02 Jan 2002 23:05:23 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: bug in join? 
Hi Tom,

I did download this friday morning and compiled and installed it on my
system.  Looks like the bug is fixed!  I also ran vacuum analyze a few
hundred times to make sure ;.)

We were wondering when the next (beta) release is scheduled for?

Thank you for the quick response to this problem!

L.
On Wed, 2 Jan 2002, Tom Lane wrote:

> Okay, I've committed a fix to CVS.  The easiest way for you to pick it
> up is probably to grab tonight's nightly snapshot,
> ftp://ftp.us.postgresql.org/dev/postgresql-snapshot.tar.gz
> (or a closer ftp mirror if you have one).
>
> 			regards, tom lane
>

-- 
Laurette Cisneros
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
Passenger Information Everywhere


Mon, 7 Jan 2002 10:13:02 -0800 (PST)
Laurette Cisneros <laurette@nextbus.com>
Re: bug in join? 