pg_statistic, lack of documentation

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема pg_statistic, lack of documentation
Дата
Msg-id CAL_0b1sm1eXnhN=GgXLdswnBN3rbt-8=LA6GBQPCaFoDURMzrQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_statistic, lack of documentation  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Hi,

http://www.postgresql.org/docs/9.1/interactive/catalog-pg-statistic.html

It specifies that entries are created by ANALYZE, but does not mention
that if a table is empty the entry for it is not created. Probably it
is worth to add to the docs. The test case is below.

grayhemp@[local]:5432 test=#create table t1 (i integer);CREATE
TABLEgrayhemp@[local]:5432 test=#select stanullfrac, stawidth from
pg_statistic where starelid = 't1'::regclass; stanullfrac | stawidth
-------------+----------(0 rows)
grayhemp@[local]:5432 test=#analyze t1;ANALYZEgrayhemp@[local]:5432
test=#select stanullfrac, stawidth from pg_statistic where starelid =
't1'::regclass; stanullfrac | stawidth -------------+----------(0
rows)
grayhemp@[local]:5432 test=#insert into t1 values (1);INSERT 0
1grayhemp@[local]:5432 test=#select stanullfrac, stawidth from
pg_statistic where starelid = 't1'::regclass; stanullfrac | stawidth
-------------+----------(0 rows)
grayhemp@[local]:5432 test=#analyze t1;ANALYZEgrayhemp@[local]:5432
test=#select stanullfrac, stawidth from pg_statistic where starelid =
't1'::regclass; stanullfrac | stawidth -------------+----------
   0 |        4(1 row)

--
Sergey Konoplev

Blog: http://gray-hemp.blogspot.com
LinkedIn: http://ru.linkedin.com/in/grayhemp
JID/GTalk: gray.ru@gmail.com Skype: gray-hemp


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: psql NUL record and field separator
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: controlling the location of server-side SSL files