From: | Geoffrey <esoteric(at)3times25(dot)net> |
---|---|
To: | pgsqlnovice <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: [despammed] \d output to a file |
Date: | 2004-12-15 15:23:54 |
Message-ID: | 41C0570A.7010505@3times25.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice pgsql-performance |
Andreas Kretschmer wrote:
> am 15.12.2004, um 6:38:22 -0800 mailte sarlav kumar folgendes:
>
>>Hi All,
>>
>>I would like to write the output of the \d command on all tables in a database to an output file. There are more than 200 tables in the database. I am aware of \o command to write the output to a file. But, it will be tough to do the \d for each table manually and write the output to a file. Is there a command/ way in which I can achieve this without having to do it for each table?
>>Any help in this regard would be really appreciated.
>
>
> You can write a little shell-script to list all tables via \d and parse
> the output to generate for each table a '\d table'.
Or:
for table in $(<filethatcontainsalistofthetables); do
echo "\d $table" | psql $DATABASE > ${table}.out
done
--
Until later, Geoffrey
From | Date | Subject | |
---|---|---|---|
Next Message | Grega Bremec | 2004-12-15 15:35:58 | Re: [PERFORM] \d output to a file |
Previous Message | Geoffrey | 2004-12-15 15:17:10 | Re: \d output to a file |
From | Date | Subject | |
---|---|---|---|
Next Message | Grega Bremec | 2004-12-15 15:35:58 | Re: [PERFORM] \d output to a file |
Previous Message | Geoffrey | 2004-12-15 15:17:10 | Re: \d output to a file |