Tested on todays HEAD of 9.3.
Steps to reproduce:
$ create table t1 (i int4);
CREATE TABLE
$ insert into t1 (i) values (1);
INSERT 0 1
$ analyze t1;
ANALYZE
$ select count(*) from pg_statistic where starelid = 't1'::regclass;
count
-------
1
(1 row)
$ create table t2 () inherits (t1);
CREATE TABLE
$ analyze t1;
ANALYZE
$ select count(*) from pg_statistic where starelid = 't1'::regclass;
count
-------
2
(1 row)
$ drop table t2;
DROP TABLE
$ analyze t1;
ANALYZE
$ select count(*) from pg_statistic where starelid = 't1'::regclass;
count
-------
2
(1 row)
I think that the additional row (with stainherit = true) should be deleted.
Best regards,
depesz
--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/