Alec Mitchell <apm13@columbia.edu> writes:
> I applied the patch to the 7.3.2 sources, but strangely I get a segfault when
> I run initdb using the patched PostgreSQL. Specifically I get this error:
Sigh ... I do know better than to commit changes without having
regression-tested 'em. Honest ;-)
Add this patch atop the last:
*** src/backend/utils/adt/selfuncs.c.orig Tue Apr 15 01:18:12 2003
--- src/backend/utils/adt/selfuncs.c Wed Apr 16 00:37:58 2003
***************
*** 1610,1617 ****
* side? It seems that if we assume equal distribution for the
* other side, we end up with the same answer anyway.
*/
! double nullfrac1 = stats1->stanullfrac;
! double nullfrac2 = stats2->stanullfrac;
selec = (1.0 - nullfrac1) * (1.0 - nullfrac2);
if (nd1 > nd2)
--- 1610,1617 ----
* side? It seems that if we assume equal distribution for the
* other side, we end up with the same answer anyway.
*/
! double nullfrac1 = stats1 ? stats1->stanullfrac : 0.0;
! double nullfrac2 = stats2 ? stats2->stanullfrac : 0.0;
selec = (1.0 - nullfrac1) * (1.0 - nullfrac2);
if (nd1 > nd2)
regards, tom lane