Tom Lane wrote:
> Jan's right: this is an oversight in the design of the VacAttrStats API.
> The existing pg_statistics "slot" types all need an array of the same
> datatype as the underlying column, but it's obvious when you think about
> it that there could be kinds of statistics that need to be stored as an
> array of some other type. I'm good with the idea of extending
> VacAttrStats for the purpose.
Perhaps we would also want the ability to store the base element type
when the column is an array. So for a 1D int[] column, we would store
a 1D array in pg_statistics instead of a 2D array. Modules like intagg
may find some use to that ability.
I point this out because it also says that instead of inventing "most
common lexeme" we want to turn into the more generic "most common
element" or something like that.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support