<mallah@trade-india.com> writes:
> I observed that a table which used to take 16 secs with \d was only taking
> 6 secs if the query for default attribute values are shifted to top level query in
> psql/describe.c ( function describeOneTableDetails ) .
I've applied this patch with some small improvements (to shortcircuit
the sub-SELECT for columns with no default).
regards, tom lane