Awhile back I said:
> Oh, I see it: range selectivity double-excludes NULLs. See the comment
> for clauselist_selectivity in src/backend/optimizer/path/clausesel.c.
> The individual estimates for the two component comparison operators
> each exclude nulls, and when we merge them together we get the wrong
> answer.
Just FYI, I have fixed this for 7.3.
regards, tom lane