As per discussion, \d shows only the number of child tables, because that
could be hundreds, when used for partitioning. \d+ shows the actual list.
Author: Damien Clochard <damien@dalibo.info>
printfPQExpBuffer(&buf,"SELECT c.oid::pg_catalog.regclass FROM pg_catalog.pg_class c, pg_catalog.pg_inherits i WHERE c.oid=i.inhrelid AND i.inhparent = '%s' ORDER BY c.oid::pg_catalog.regclass;",oid);
result=PSQLexec(buf.data,false);
if(!result)
gotoerror_return;
else
tuples=PQntuples(result);
if(!verbose)
{
/* print the number of child tables, if any */
if(tuples>0)
{
printfPQExpBuffer(&buf,_("Number of child tables: %d (Use \\d+ to list them.)"),tuples);