@@ -1280,6 +1280,7 @@ describeOneTableDetails(const char *schemaname,
12801280if (verbose )
12811281{
12821282appendPQExpBuffer (& buf ,",\n a.attstorage" );
1283+ appendPQExpBuffer (& buf ,",\n CASE WHEN a.attstattarget=-1 THEN NULL ELSE a.attstattarget END AS attstattarget" );
12831284/*
12841285 * In 9.0+, we have column comments for: relations, views, composite
12851286 * types, and foreign tables (c.f. CommentObject() in comment.c).
@@ -1374,6 +1375,8 @@ describeOneTableDetails(const char *schemaname,
13741375if (verbose )
13751376{
13761377headers [cols ++ ]= gettext_noop ("Storage" );
1378+ if (tableinfo .relkind == 'r' )
1379+ headers [cols ++ ]= gettext_noop ("Stats target" );
13771380/* Column comments, if the relkind supports this feature. */
13781381if (tableinfo .relkind == 'r' || tableinfo .relkind == 'v' ||
13791382tableinfo .relkind == 'c' || tableinfo .relkind == 'f' )
@@ -1473,10 +1476,18 @@ describeOneTableDetails(const char *schemaname,
14731476(storage [0 ]== 'e' ?"external" :
14741477"???" )))),
14751478 false, false);
1479+
1480+ /* Statistics target, if the relkind supports this feature */
1481+ if (tableinfo .relkind == 'r' )
1482+ {
1483+ printTableAddCell (& cont ,PQgetvalue (res ,i ,firstvcol + 1 ),
1484+ false, false);
1485+ }
1486+
14761487/* Column comments, if the relkind supports this feature. */
14771488if (tableinfo .relkind == 'r' || tableinfo .relkind == 'v' ||
14781489tableinfo .relkind == 'c' || tableinfo .relkind == 'f' )
1479- printTableAddCell (& cont ,PQgetvalue (res ,i ,firstvcol + 1 ),
1490+ printTableAddCell (& cont ,PQgetvalue (res ,i ,firstvcol + 2 ),
14801491 false, false);
14811492}
14821493}