Generate metadata file from PostgreSQL server
If you want something quick and dirty, I would just use psql to dump out all the tables.

for t in $(psql -Ac '\dt' | awk -F'|' '$3 == "table" {print $2}');
do
    psql -c "\\d $t"
done &gt; metadata.tables


Job done.