OK, I haven't heard any objections to my last proposal for improving
selectivity estimates for "=", so I'm going to bull ahead and implement it.
This will require adding columns to a system table, which I've never
done before. There are some attribute statistics in pg_attribute and
some in pg_statistic, but it looks like changing pg_attribute is a
pretty dangerous business, so I'm inclined to leave pg_attribute alone
and just add columns to pg_statistic.
Do I need to do anything beyond making the obvious additions to
catalog/pg_statistic.h, rebuild, and initdb? I see that pg_attribute.h
doesn't contain any handmade entries for pg_statistic, so that at least
is no problem...
regards, tom lane