pg_dump.c:
!       if (g_fout->remoteVersion >= 80400)

            tbinfo->attstattarget[j] = atoi(PQgetvalue(res, j, i_attstattarget));
+           tbinfo->attdistinct[j] = strdup(PQgetvalue(res, j, i_attdistinct));
...
+           if (atof(tbinfo->attdistinct[j]) != 0 &&
+               !tbinfo->attisdropped[j])

 - style issue, convert at PQgetvalue() time

 - prefer strtod() over atof?

     The atof() function has been deprecated by strtod() and should not be used in
     new code.

tablecmds.c:
+   switch (nodeTag(newValue))
+   {
+       case T_Integer:
...
+       case T_Float:
...

 What about
	Assert(IsA(newValue, Integer) || IsA(newValue, Float));


-=-=-=-

dim=# create table foo(x int);
CREATE TABLE
dim=# create index idx_foo_x on foo(x);                                                                                                        
CREATE INDEX
dim=# insert into foo select (1000*random())::int from generate_series(1, 1000) as t(x);                                                                                                        
INSERT 0 1000
dim=# analyze verbose foo;
INFO:  analyzing "public.foo"
INFO:  "foo": scanned 4 of 4 pages, containing 1000 live rows and 0 dead rows; 1000 rows in sample, 1000 estimated total rows
ANALYZE

dim=# select attname, attdistinct from pg_attribute where attrelid = 'foo'::regclass and attname = 'x';
 attname | attdistinct 
---------+-------------
 x       |  1.2166e-38
(1 row)

dim=# alter table foo alter column x set distinct 1;
ALTER TABLE
dim=# select attname, attdistinct from pg_attribute where attrelid = 'foo'::regclass and attname = 'x';
 attname | attdistinct 
---------+-------------
 x       |           1
(1 row)

dim=# analyze verbose foo;
INFO:  analyzing "public.foo"
INFO:  "foo": scanned 4 of 4 pages, containing 1000 live rows and 0 dead rows; 1000 rows in sample, 1000 estimated total rows
ANALYZE
dim=# select attname, attdistinct from pg_attribute where attrelid = 'foo'::regclass and attname = 'x';
 attname | attdistinct 
---------+-------------
 x       |           1
(1 row)
dim=# alter table foo alter column x set distinct 0;
ALTER TABLE
dim=# analyze verbose foo;
INFO:  analyzing "public.foo"
INFO:  "foo": scanned 4 of 4 pages, containing 1000 live rows and 0 dead rows; 1000 rows in sample, 1000 estimated total rows
ANALYZE
dim=# select attname, attdistinct from pg_attribute where attrelid = 'foo'::regclass and attname = 'x';
 attname | attdistinct 
---------+-------------
 x       |           0
(1 row)
