Re: pg_stat_all_tables vs NULLs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_stat_all_tables vs NULLs
Дата
Msg-id 26534.1228265561@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_stat_all_tables vs NULLs  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: pg_stat_all_tables vs NULLs
Список pgsql-hackers
Magnus Hagander <magnus@hagander.net> writes:
> I've noticed that pg_stat_all_tables returns NULL for idx_scan and
> idx_tup_fetch if there are no indexes present on a table.

> Is this actually intended, or is that something that should be fixed?

Hmm.  I suspect it's an implementation artifact rather than something
that was consciously chosen, but on reflection it doesn't seem like a
bad thing.  If we just COALESCE'd it to zero (which I assume is what
you have in mind) then there would be no distinction in the view
between "you have no indexes" and "there are indexes but they aren't
being used".

I'd vote to leave it alone, I think.
        regards, tom lane


В списке pgsql-hackers по дате отправления: