[HACKERS] road.thepath no longer in pg_stats?

2010-04-27 Thread Alvaro Herrera
Hi,

I just noticed that the road.thepath column in the regression database
is no longer in pg_stats for some reason after ANALYZE, so the example
in section 14.2 in the docs (Statistics Used by the Planner) is now
wrong.

What I'm trying to do is replace that exceedingly wide output with
something along these lines instead:

SELECT attname, n_distinct, array_to_string(most_common_vals, E'\n') as 
most_common_vals
FROM pg_stats
WHERE tablename = 'road';

but this is failing because of missing values for that column, as well
as there being two rows for the column that is there (stainherint=f
producing the other one)

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] road.thepath no longer in pg_stats?

2010-04-27 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes:
 I just noticed that the road.thepath column in the regression database
 is no longer in pg_stats for some reason after ANALYZE, so the example
 in section 14.2 in the docs (Statistics Used by the Planner) is now
 wrong.

It's an old example :-( ... a quick check shows no version since 7.3
generates stats for that column.

 but this is failing because of missing values for that column, as well
 as there being two rows for the column that is there (stainherint=f
 producing the other one)

Two rows are expected now, since that table has children --- there
should be one for inherited = t and one for inherited = f.  Probably
wouldn't hurt to explain that explicitly here.

regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers