From: Andreas Kretschmer <akretschmer@despammed.com>
To: pgsqlnovice <pgsql-novice@postgresql.org>
Subject: Re: [despammed] \d output to a file
Date: Wed, 15 Dec 2004 16:04:08 +0100
Message-ID: <20041215150408.GA11184@Pinguin.wug-glas.de> (raw)
In-Reply-To: <20041215143822.37534.qmail@web51304.mail.yahoo.com>
References: <20041215143822.37534.qmail@web51304.mail.yahoo.com>
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'.
Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Tel. NL Heynitz: 035242/47212
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: akretschmer@despammed.com, pgsql-novice@postgresql.org
Subject: Re: [despammed] \d output to a file
In-Reply-To: <20041215150408.GA11184@Pinguin.wug-glas.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox