Обсуждение: ALTER INDEX .. SET STATISTICS not documented

Поиск
Список
Период
Сортировка

ALTER INDEX .. SET STATISTICS not documented

От
Alvaro Herrera
Дата:
I'm sitting in Alexey Ermakov's talk and he just said that the command
in $SUBJECT is not documented ... do we need a separate blurb about it
somewhere?

I just tried it and it does do something useful, at least for expression
indexes, since we collect stats for those.  This is news to me.  There's
a small issue that the column names for them are rather awful, but since
they are unique there's not actually anything you can't do.

Note that it's allowed to change the stats target of non-expression
index columns too, but that doesn't seem to have any useful effect.

--
Álvaro Herrera       Peñalolén, Chile


Re: ALTER INDEX .. SET STATISTICS not documented

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> I'm sitting in Alexey Ermakov's talk and he just said that the command
> in $SUBJECT is not documented ... do we need a separate blurb about it
> somewhere?

Hm ... at one time there was not any real expectation that the ALTER INDEX
reference page would tell you exactly which subforms of ALTER TABLE would
work on an index; it was mostly "try it and see".  But now we probably
should try to cover all the cases there, including this one.

            regards, tom lane