-
Tom Lane authored
inputs is unique or nearly so), make eqjoinsel() clamp the ndistinct estimates to be not more than the estimated number of rows coming from the input relations. This allows the estimate to change in response to the selectivity of restriction conditions on the inputs. This is a pretty narrow patch and maybe we should be more aggressive about similarly clamping ndistinct in other cases; but I'm worried about double-counting the effects of the restriction conditions. However, it seems to help for the case exhibited by Grzegorz Jaskiewicz (antijoin against a small subset of a relation), so let's try this for awhile.
7f3eba30